Private Sub Button2_Click
Dim l2 As List
l2.Initialize
l2.Clear
l2.Add(Array As String("telephone","name","Age","Create","=ARRAYFORMULA(SI(A1:A<>"""";FILA(A1:A);""""))")) 'Place this Formula at the end so that you can retrieve the row number
Dim c As Cursor
c = Starter.SQL1.ExecQuery("SELECT* FROM sheets")
Dim l1 As List
l1.Initialize
l1.Clear
If c.RowCount>0 Then
For i=0 To c.RowCount-1
c.Position=i
l1.Add(Array As String(c.GetString("telephone"), _
c.GetString("name"), _
c.GetString("age"), _
c.GetString("date")))
Next
end If
c.Close
Try
s.DBtoSpreadsheet("My DB","Users",l2,l1)
Catch
End Try
Sleep(5000)
dim datatableid as string
datatableid = s.newspreadsheetsid 'retrieves the id of the newly created spreadsheet so that you can store it a sleep(5000) is recommended and then retrieves it to store it and be able to work on the newly created spreadsheet
ToastMessageShow(datatableid,True)
loadtable
End Sub