I am using excel sheet to export data to QTP but it
selects just one row of data from excel sheel how to import
all rows of excel sheet to QTP during runtime

Answer Posted / uday kumar_anem

Here i am sharing a small snippet script, to import the
data from Excel sheet to QTP during runtime and using the
values.

I have an Excel sheet which contains OrderNumber column and
its values. After that i am displaying the order numbers in
excel during runtime.

datatable.Import("E:\Programming Samples\QTP
Samples\OrderNumbers.xls")
datatable.GetSheet(1)
rowCount=datatable.GetRowCount
For i=1 to rowCount
datatable.SetCurrentRow(i)
val=datatable.Value("OrderNumber","Global")
msgbox(val)
Next

Is This Answer Correct ?    19 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

I have 5 save buttons in 5 tabs . The tabs are placed one after the other. My object repository have these added as 5 save buttons with name sav1, save 2, save 3 , save 4, save 5 .all are getting highlighted from OR but they are not getting clicked. After spying each button all the properties are same except First button Index 0 html id:=btnSaveTab1 outerhtml:=", Second button "html id:=btnSave "outerhtml:=", Third button "html id:=", outerhtml:=",

1355


How does qtp identify the object in the application?

539


For QTP Test Engineer, What is his contribution to the Project? Means, As as automation test engineer what is his role in the current project?

1747


Have you used xml check point in your project? How?

551


How to modify the text checkpoint?

618






Do you know how to connect database? Can you tell me the procedures?

553


suppose in the middle of the project QTP will not work properly, then what do u do? and ur team?

1328


What are the ordinal identifiers in web page?

642


Could you please any one give code for the following ? Scenario : Suppose a excel file contains 10 records and earch have 5 fields. how can i input this excel file for datadrive wizard ? Please explain

1464


I am facing an issue of object identification with the dropdown element of DHTML grid. When I tried to recognize these different dropdown objects, QTP identifies only one object for all the dropdowns. Hence, selection of different data from different dropdowns list is an issue. To overcome this problem, i have used Descriptive Programming technique by creating different object descriptions which have all the other properties same but differ only in one property i.e. ‘X’ location of the element on the screen. Hence, i have created distinct object descriptions that would allow us to select values in different dropdowns. The code is given below. But still I am unable to identify distinct dropdown objects. ‘Object Description for Dropdown Cell Status Set objCellStatus = Description.Create objCellStatus("micclass").value = "WebList" objCellStatus("name").value = "select" objCellStatus("x").value = 219 ------ ‘X’ Axis value for cell status drop down ‘Object Description for Dropdown Sub Segment Set objSubSegment = Description.Create objSubSegment("micclass").value = "WebList" objSubSegment("name").value = "select" objSubSegment("x").value = "319" ------ ‘X’ Axis value for sub segment drop down Please help... This is specific to DTML grid(Drop down object)

1414


Have you faced any problems with object repository?

592


How often were they executed?

2039


how to find that tools work well with ur existing system?

1356


What is 'sleep' in sync point?

629


What are benefits of qtp?

585