| || |
Imported data is Sheet1 instead of Global/Action1
I imported data into a data table. However, I only see a "Sheet1" tab,instead of "Global" or "Action1". My script does not recognize "Sheet1" and I get an error message that there is no sheet. How do I change the setting of the tab to "Global?"
Re: Imported data is Sheet1 instead of Global/Action1
That is because the the sheet in the Excel you are importing, has different name. Import function overrides whatever you have in it. You will be lost default QTP DataTable with sheets structures, you expected.
To solve that:
1. You can match correct sheet names in Excel itself before importing it.
2. You can import sheet instead of entire Excel:
DataTable.ImportSheet "C:\temp\testdata.xls", 1, dtGlobalSheet