QTP data table question

In QTP data table, we have two excel sheets one is Global and another one is Local(Action1). If I want to enter another excel sheet in Data Table, then how will I add ?

Showing Answers 1 - 18 of 18 Answers

Sriram

  • Oct 16th, 2007
 

You can use datatable.Addsheet("sheetName") after that use datatable.ImportSheet function

v=DataTable.AddSheet ("SheetName").AddParameter ("ColumnName Time","ColumnValue 8:00" )
msgbox"go"

DataTable.ImportSheet  "c:temp.xls",1,"SheetName"
msgbox "look"


SheetName is depend on you..you can give any sheet name.

  Was this answer useful?  Yes

in data table two sheet are there : global,action
if global

window("  ").winedit("  ").set datatable(" ",dtglobalsheet)

if action

for i=1 to 10 step 1
datatable.set current row (i)
window(" ").winedit(" ").set datatable(" ",dtlocalsheet)

  Was this answer useful?  Yes

kotike

  • Apr 14th, 2010
 

We can dynamically add/delete sheets to runtime datatable.

datatable.addsheet "sheet name" '

It will add sheet to runtime datatable during runtime.  We can see this table in results runtime datatable.  Once adding sheet at runtime then import data into that sheet

datatable.importsheet "path of the sheet",sourcesheet id,3

3 indicates destination sheet id which we add at runtime
then we can see data in results-->Runtime datatable

  Was this answer useful?  Yes

Gowthami

  • Dec 13th, 2017
 

datatable.addsheet
Using above statement we can insert a new sheet to the datatable

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions