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 / chivukula.kumar

datatable.Import("E:\Programming Samples\QTP
Samples\OrderNumbers.xls")

colcount = datatable.GetSheet(k).GetParametercount
rowcount = datatable.GetSheet(K).GetParametercount
shtcount = datatable.Getsheetcount

for i = 1 to rowcount step 1
for j = 1 to colcount step 1
for k = 1 to shtcount step 1
datatable.setcurrentrow(i)
val =datatable.Getsheet(k).GetParameter(j).ValuebyRow(i)
next
next
next


Note : the above script for entire workbook values we can
get .
next

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between per-action and shared?

588


If there is a change in the object type eg: A button is changed as link, 1. How to edit that in the shared object repository. 2.What options are available to edit the object within shared object repository other than copy from loca; 3.What would be the effect of the change in Coded Scripts within QTP and Functions stored in .vbs file which are loaded and used in QTP

1299


Functions call by reference and call by value. i want the diff b/n these 2 and how will be the script for this?in which situation we use these 2..?pls explain me clearly

1251


What is accessibility check point?

655


What is the new version of qtp which is recently released in the market?

637






What are the different types of recording modes?

529


in a web page hoe to check the dynamic links that rechabging with out using regular expressions

1773


can any one please tell me which is the best institute in Bangalore to learn QA (crash course)? Thanks

1522


can any body tell me how i create a simple script and apply output value on it .pls send me a step by step process

1279


Can an action have 2 shared object repositories associated with them? In that case, if two of them contain the same object, which one will be considered?

587


X flies from Hyd to bangalore using different methods of transportation. write the test scenarios and test cases for this?

1499


What is quicktest professional (qtp)?

565


If an application name changes frequently i.e while recording it has the name, in this case, how do qtp handles?

579


Hi Friends, Can anyone help me out in this one? In QTP, I am using Data Driver and want to parameterise multiple values (say 3 values ) for a field. How can I do it using Data Driver wizard? Plz mention it step-by-step. In the end after doing the needful, on opening the Data Driver window, how can I get number (i.e. 3) in the Parameterised column for that particualr value? Thanks a lot in advance.

1441


Dear Friends, I having total 3+year experience in manual testing including automation testing QTP, if i am attending any interview what kind of question will i get? please help me out

1577