I am trying to load an Excel 97 single tabbed spreadsheet into a SQL server table using the OleDbDataAdapter function. From all the documentation I have found, the first parameter should be "select * from [sheet1$]". This works fine for me only if the tab in the worksheet is named Sheet1. If I change what's in the [] brackets to the actual tab name, it also works fine.
The issue is that the spreadsheet being loaded is coming from another system and that system changes the tab name with each load. How can a figure out what the tab name is so that my users don't have to open the spreadsheet and rename the tab?