DavidT_macktool
Well-known member
anybody know how to read in Excel data when the Excel Spreadsheet has had the worksheet renamed.
How would you update the above code to get the data if [Sheet1$] has been renamed to something else more meaningful, like "Employee Listing"? The key is that you will not know what the name is of the worksheet(s) every time.
Thanks for reading,
VB.NET:
ExcelCommand = New System.Data.OleDb.OleDbDataAdapter( _
"select * from [Sheet1$]", ExcelConnection)
How would you update the above code to get the data if [Sheet1$] has been renamed to something else more meaningful, like "Employee Listing"? The key is that you will not know what the name is of the worksheet(s) every time.
Thanks for reading,