TheInsider
Programmer
Not sure if this is the correct forum, but hopefully someone will know the answer:
I'm trying to use ADO and SQL (in an Access VBA module) to select data from the first worksheet of any xls file that I choose. The problem is I have several xls files with similar data, but each has a different name for the first worksheet.
Therefore, the following doesn't work:
SELECT * FROM [Sheet1$];
Does anyone know how to get the name of the first worksheet in an xls workbook via ADO or what syntax to use in my SQL statement above?
TIA!
I'm trying to use ADO and SQL (in an Access VBA module) to select data from the first worksheet of any xls file that I choose. The problem is I have several xls files with similar data, but each has a different name for the first worksheet.
Therefore, the following doesn't work:
SELECT * FROM [Sheet1$];
Does anyone know how to get the name of the first worksheet in an xls workbook via ADO or what syntax to use in my SQL statement above?
TIA!