Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do I get the name of DataTable.Sheet(i)?
#1
Solved: 11 Years, 3 Months, 4 Weeks ago
Hi all,

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?
Reply
#2
Solved: 11 Years, 3 Months, 4 Weeks ago
Why don't you try importing sheet and count the sheet in excel.
Reply
#3
Solved: 11 Years, 3 Months, 4 Weeks ago
Check this below code which will show all the sheet names

Code:
For i = 1 to DataTable.GetSheetCount
msgbox DataTable.GetSheet(i).Name
Next
Thanks,
SUpputuri
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Reading Global Sheet's DataTable Value Bhuvana 0 1,639 01-05-2020, 10:03 PM
Last Post: Bhuvana
  export data from one sheet to another sheet in data table raaj123 1 2,351 05-21-2013, 02:21 PM
Last Post: Shahzaad
  Naming convention of datatable global sheet. TurtleRock 2 3,242 01-14-2013, 11:56 AM
Last Post: nilanjans
  Datatable add and datatable import sheet wheelercha 4 33,634 06-14-2012, 04:53 PM
Last Post: Arul
  How to get more than one Local DataTable sheet for one Action? Uma 2 3,947 10-05-2011, 01:28 AM
Last Post: Uma

Forum Jump:


Users browsing this thread: 1 Guest(s)