good afternoon. I'm connecting to an xlsx excel file using OleDB, I wanted to know, in what way can I know the name of the table in the file.
That is to say, every day they send me an excel file where the table changes. Then I to do the queries (for example a SELECT * FROM) I need to know from which table I want to consult. But this changes constantly so my idea is to make the connection
Using conn As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\Programador\Desktop\Compartido\precios.xlsx; Extended Properties=""Excel 12.0 Xml;HDR= YES"";")
and in some way that I do not know, receive the name of the first table. In the case of this file, the query is
Using cmda = New OleDb.OleDbDataAdapter("SELECT * from [_xlnm#_FilterDatabase]", conn)
I hope you can help me, thank you very much !!