I have an Excel file and I am getting the list of sheetnames in the Excel file using this code
Dim dt As DataTable
db.ConnectionSettings.DataSource = String.Concat("=", filePath)
Using con As DbConnection = db.CreateConnection
con.Open()
dt = con.GetSchema("Tables")
End Using
Instead of just getting Sheet1$, Sheet2$ for sheet names , I am getting back
Sheet1$, Sheet1$Database, Sheet1$_ , Sheet2$ , Sheet2$Database, Sheet2$_
I noticed when you have filters in an Excel file, they are getting returned as sheetnames.
(Database is a user defined filter name)
How can I just get back the actual sheetnames of an Excel file? I can't just look for underscores, since filter names can be set to anything by the user. ( ex: Database)
Thank you,
Burak