Micro Focus QTP (UFT) Forums
Naming convention of datatable global sheet. - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Naming convention of datatable global sheet. (/Thread-Naming-convention-of-datatable-global-sheet)



Naming convention of datatable global sheet. - TurtleRock - 01-08-2013

Hi,

I need to know that can the name of global sheet be only "Global" .


RE: Naming convention of datatable global sheet. - harishshenoy - 01-08-2013

Yes , you cant rename the global sheet , but it is possible for the local sheets , loca sheets takes the name of 'Action Name' of the respective actions.

Thanks,
Harish Shenoy


RE: Naming convention of datatable global sheet. - nilanjans - 01-14-2013

Hi,

Globalsheet name should be global only. It can't be renamed. But Local datasheets can be renamed and for that you need to rename the corresponding action name.

But if you want to import sheets from external .xls sheet and want to keep the sheet name intact then better not to import the whole Workbook.

Better you should go for add those many sheets on runtime and import those specific sheets to those added sheets accordingly.
You can try with the below code for that:


Code:
DataTable.AddSheet "Sheet1"
DataTable.AddSheet "Sheet2"
DataTable.AddSheet "Sheet3"

DataTable.ImportSheet "C:\Mytest.xls","Sheet1","Sheet1"
DataTable.ImportSheet "C:\Mytest.xls","Sheet2","Sheet2"
DataTable.ImportSheet "C:\Mytest.xls","Sheet3","Sheet3"

Thanks,
Nilanjan.