How to Import data from a ".xls" file to Data table
during Runtime.
Answer Posted / sreeprasad
DataTable.Import("path of the file")
DataTable.ImportSheet("filepath","sheetsource","sheetDest")
Sheetsource:index or name of the sheet in the file which u
want to import. index begins vth 1.
SheetDest: index or name of the sheet in the datatable
which u want to replace vth Sheetsource.Index begins vth 1.
ex:
Datatable.importsheet("c:\name.xls",1,"name")
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is the new version of qtp which is recently released in the market?
How to get popup error message.
Can U Explain about QTP tool from older version to latest version also its differences?
How can I change object description or check point values in qtp?
How to give a call to another action from one action?
Diff b/w Health care domain and Banking Domain?
How to run a test using quicktest professional?
I want to test my vb.net solution file using qtp. Does Qtp test only .exe file?
what is impact analysis on regression testing?
Difference between test object and run time object?
What is the Difference between test object and run time object?
How can we use the "CreateObject("Shell.Application")" in QTP and what is the definition and purpose of it?
There are 10 rows in the datatable. How can we fetch 2 rows and then skip 3rd row. After that, pick 4th & 5th row and skip 6th row. Please share code
what type of framework u r using in ur organization
I need to obtain the parent of an object programatically, so if I have: winButton("aButton") I need to obtain the parent part: window("Window1").Dialog("Dialog1") so I can programatically create a string of the full name of the object to call it with an execute statement in QTP I would like to use something like: part[1] = "window(""Window1"")" part[2] = "dialog(""Dialog1"")" so I can do: exeLine = part[1]&"."&part[2]&"."&"winButton(""aButton"")" Execute exeLine Apart from keeping a record of the window/dialog hierarchy is there a parent or path function/ command Thanks Adrian