IN EXCEL SHEET OF qtp SUPPOSE I ENTERED 10 NUMBERS RANDOMLY
I HAVE TO GET TOTAL OF TEN NUMBERS IN THE 11 COLUMN USING qtp
GIVE CODE TO IT USING qtp

Answers were Sorted based on User's Feedback



IN EXCEL SHEET OF qtp SUPPOSE I ENTERED 10 NUMBERS RANDOMLY I HAVE TO GET TOTAL OF TEN NUMBERS IN ..

Answer / sudha sharma

Pre Condition : Enter 10 randon numbers in the datatable of
QTP. Write down the following code :

For i=1 to 10
datatable.SetCurrentRow(i)
total=cint(datatable.Value(1,1))+total
Next

datatable.SetCurrentRow(i)
datatable.value(1,1)=total

The total of 10 random numbers get posted in the run time
data table. You can view it through automation -> results -
> run time data table.

This is for QTP data table. If the data is in the excel
sheet then you have import the data.

Is This Answer Correct ?    2 Yes 0 No

IN EXCEL SHEET OF qtp SUPPOSE I ENTERED 10 NUMBERS RANDOMLY I HAVE TO GET TOTAL OF TEN NUMBERS IN ..

Answer / laxmi

datatable.ImportSheet "C:\Documents and
Settings\Administrator\Desktop\excel.xls",1,Global

then go to test->settings->run->check run one iteration
radio button

or i= datatable.ImportSheet "C:\Documents and
Settings\Administrator\Desktop\excel.xls",1,Global
for i=1
//body
next

Is This Answer Correct ?    2 Yes 2 No

Post New Answer

More QTP Interview Questions

CAN SOME ONE TELL ME ABOUT QTP FRAMEWORK? I AM SUPPOSED TO GIVE THE QTP FRAMEWORK THIS WEEK SO PLEASE HELP

2 Answers  


Local Obj Repository and SOR are editable know, y we have to edit those.. i mean in which situation we need to edit those and how to do..? pls help me..

2 Answers  


Can you import and export data from XLS and how?

4 Answers  


Hi, How Accessibility checkpoint in QTP can be implemented in the test script?

0 Answers  


Hi, Plz give best Definition of Software Testing? Why we need Software Testing? and plz send 2+yrs experience Interview qutions (Manual,Qtp).

1 Answers  


How you can write contexts to text file in qtp?

0 Answers  


Among the 4 capture levels, Complete, Partial, Minimal, None. which one is mostly used?

1 Answers  


what are the frame work models of qtp?which frame work you follow in your company?and explain it process?

0 Answers   Covansys,


after initiating one project for testing, when exacltly QTP tester role starts?

0 Answers  


Hi! Using Descriptive Programming How do we get Parent object for an object. Say, i want to get a parent object for a "Link" in a web page. thanks

3 Answers  


How to export data present in Datatable to an ".xls" file?

2 Answers  


Explain in brief about the qtp automation object model (aom).

0 Answers  


Categories