My system is getting struck when i import excel sheet to the QTP runtime DataTable - 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: My system is getting struck when i import excel sheet to the QTP runtime DataTable (/Thread-My-system-is-getting-struck-when-i-import-excel-sheet-to-the-QTP-runtime-DataTable) |
My system is getting struck when i import excel sheet to the QTP runtime DataTable - vadmani - 09-01-2009 Hi Here I am facing issue im importing a excel sheet to the new Runtime datatable sheet. Here is the detailed information with script 1) Testcases.xls contains two sheets.... 2) Opened the blank QTP test 3) Imported the Testcases.xls file to the QTP using the script: Datatable.import "C:\Testcases.xls" 4) Added one more sheet to the runtime datatable using the DataTable.AddSheet "Sheet1" Now we have three sheets in the Runtime Datatable(one is Global, second one is Action 1 and 3rd one is Sheet1) 5) Tried to import sheet to the QTP Runtime Datatable uisng the script DataTable.importSheet "C:\DataTable.xls",1,3 Here is the problem, i am not able to proceed further...I don't know why it is giving problem. Other information is : i am using the QTP10.0 and Licensed version. Please help to solve this one. Regards Mani RE: My system is getting struck when i import excel sheet to the QTP runtime DataTable - Saket - 09-01-2009 Hi Mani, Thanks for such a detailed post, it helps to understand the exact issue. If you want to import an Excel file in your Datatable. Just do the two steps 1. Add a sheet to your datatable 2. Import the sheet you want from the excel file Try this Code: Datatable.AddSheet "Sheet1" In your mentioned steps I can see you have imported the excel in line 3 if you do a Import, the imported xls replaces all data in the existing run-time Data Table (including all data sheets). also the files mentioned are different, I beleive you need to use the file mentioned earlier. Hope this helps, let me know there is any issue. Sorry, I misunderstood, I beleive you are preparing the datatable by importing the sheet. just noticed that you have taken a blank test. this is working fine when I tried. I doubt there must be some issue the DataTable.xls. RE: My system is getting struck when i import excel sheet to the QTP runtime DataTable - vadmani - 09-01-2009 Hi Saket, Thanks for your Quick reply, I can follow the steps mentioned in your reply if i am using the single excel file which has 3 sheets but i want to use both the excel files at a time. When i imported both the files, the first two Runtime Datatable sheets contains the Testcases information and the 3rd sheet contains the test data information. I have a automation framework; in that, at the Beginning of the script execution the script will imports the First Excel sheet. In the middle of the execution or whenever is required i have to import a particular sheet to the Runtime DataTable 3rd sheet. Thanks Mani, RE: My system is getting struck when i import excel sheet to the QTP runtime DataTable - Saket - 09-01-2009 Mani - Is it possible for you to attach the excel files? I would like to try out with them. RE: My system is getting struck when i import excel sheet to the QTP runtime DataTable - ram070278 - 09-01-2009 Ensure this is correct or not as saket said DataTable.importSheet "C:\DataTable.xls",1,3 RE: My system is getting struck when i import excel sheet to the QTP runtime DataTabl - basanth27 - 09-01-2009 Ram - What do you mean by " Ensure this is correct " ?? Please post the complete solution if you have any. |