Var f As FolderItem
Var RsCnTotal As RowSet
Var RsGnTotal As RowSet
Var StrSql As String
Var i As Integer
Var ConnDB As SQLiteDatabase = OpenDB()
f = New FolderItem(TxtExcel.Text, FolderItem.PathModes.Shell)
If (f<> Nil) Then
Try
Var wb As ExcelWorkbook =ExcelDb.Workbooks.Open(f.NativePath)
Var wsPerson As ExcelWorksheet = wb.Worksheets.Item("Personales y Consumo")
Var wsHipoteca As ExcelWorksheet = wb.Worksheets.Item("Hipotecas y Comerciales")
StrSql="SELECT * FROM CN_Total WHERE RunType='CN_Total' AND Sucursal='Oficina Central' GROUP BY AccName,Sucursal ORDER BY Sucursal"
RsCnTotal=ConnDB.SQLSelect(StrSql) <<< Type mismatch error. Expected class RowSet, but got class RecordSet
i=6 // star index of excel row for update with DB file
Do
wsPerson.Range("B" + Str(i)).Text=""
i=i+1
Loop Until (RsCnTotal.EOF=True)
//StrSql="Select * From GM_Total"
//RsCnTotal=ConnDB.SQLSelect(StrSql)
//wb.Save
wb.Close
ExcelDb.Quit
Catch
End Try
Else
MsgBox(“Excel File no Found !”)
Exit
End If