Sample code for 30+ languages & platforms
VB.NET

XLSX Get Sheet Names

Open an Excel spreadsheet (.xlsx) and get the names of the sheets.

Chilkat VB.NET Downloads

VB.NET
Dim success As Boolean = False

' 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 Chilkat.Zip
success = zip.OpenZip("qa_data/excel/fakeCompanies.xlsx")
If (success = False) Then
    Debug.WriteLine(zip.LastErrorText)
    Exit Sub
End If


Dim csv As New Chilkat.Csv
Dim sheetNames As New Chilkat.StringTable
success = csv.XlsxGetSheets(zip,sheetNames)
If (success = False) Then
    Debug.WriteLine(csv.LastErrorText)
    Exit Sub
End If


Dim i As Integer = 0
While i < sheetNames.Count
    Debug.WriteLine(sheetNames.StringAt(i))
    i = i + 1
End While