Visual Basic 6.0 Requires Chilkat v11.3.0+
Visual Basic 6.0
XLSX Get Sheet Names
Open an Excel spreadsheet (.xlsx) and get the names of the sheets.Chilkat Visual Basic 6.0 Downloads
Dim success As Long
success = 0
' This example assumes the Chilkat API to have been previously unlocked.
' See Global Unlock Sample for sample code.
' .xlsx files are Zip archives
Dim zip As New ChilkatZip
success = zip.OpenZip("qa_data/excel/fakeCompanies.xlsx")
If (success = 0) Then
Debug.Print zip.LastErrorText
Exit Sub
End If
Dim csv As New ChilkatCsv
Dim sheetNames As New ChilkatStringTable
success = csv.XlsxGetSheets(zip,sheetNames)
If (success = 0) Then
Debug.Print csv.LastErrorText
Exit Sub
End If
Dim i As Long
i = 0
Do While i < sheetNames.Count
Debug.Print sheetNames.StringAt(i)
i = i + 1
Loop