Sub CreateTableFromXLSX(Path As String, FileName As String)
Log("=== CreateTableFromXLSX START ===")
Log("Path: " & Path)
Log("File: " & FileName)
Dim xloutils As XLUtils
xloutils.Initialize
Dim xl As XLReader
xl.Initialize(xloutils)
Dim result As XLReaderResult = xl.ReadSheetByIndex(Path, FileName, 0)
Log("Rows: " & (result.BottomRight.Row0Based + 1) & _
" | Columns: " & (result.BottomRight.Col0Based + 1))
Dim TableData As List
TableData.Initialize
For Row1Based = 1 To result.BottomRight.Row0Based + 1
Dim col1 As String = result.Get(xloutils.AddressOne("A", Row1Based))
If col1 = "" Then Exit 'Not really needed in this case, but it is good practice.
Dim col2 As String = result.Get(xloutils.AddressOne("B", Row1Based))
TableData.Add(Array(col1,col2))
Next
B4XTable1.SetData(TableData)
End Sub