02-16-2013, 02:28 AM
(This post was last modified: 02-16-2013, 02:52 AM by RandomGrin.)
Hi all,
What I want to do is:
But there is no method called, GETNAMEOFSHEET...
Is there a way to get the name of a sheet in the DataTable?
The reason I ask is my GetSheetCount is 25 and I have no idea why there are so many! If I could list their names I could figure out where they came from.
Thanks.
PS I am importing .xls files into DataTables just because that is the first way I figured out how to use .xls files.
Should I be doing something like this instead?
Is there any significant difference between importing into DataTables and creating Workbook objects?
What I want to do is:
Code:
For i = 1 to DataTable.GetSheetCount
msgbox DataTable.GETNAMEOFSHEET(i)
next
But there is no method called, GETNAMEOFSHEET...
Is there a way to get the name of a sheet in the DataTable?
The reason I ask is my GetSheetCount is 25 and I have no idea why there are so many! If I could list their names I could figure out where they came from.
Thanks.
PS I am importing .xls files into DataTables just because that is the first way I figured out how to use .xls files.
Should I be doing something like this instead?
Code:
Set xlsApp = CreateObject("Excel.Application")
'Set xlsWorkbook = xlsApp.Workbooks.Open("c:\tests.xls")
Is there any significant difference between importing into DataTables and creating Workbook objects?