01-14-2013, 11:56 AM
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:
Thanks,
Nilanjan.
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.