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

Hello friends can anybody tell me about the architecture of QTP with diagram of it.this architecture is same for any domain like ERP/Banking/CRM/Healthcare or it's different then please tell me.thanks

4 Answers   Fidelity,


How to interact tool & application build in QTP?

0 Answers  


Is it possible to call win runner script in qtp?

0 Answers  


how we do database testing with qtp using descriptive programming?

22 Answers   Nutrins, Rohit Technologies, Symphony, Syntel, TCS,


hi, can u tell me the QTP TEsting process in present real time companies?(beware of this... now a days Recording is not using,, only DP) and don't tell note book answers like step 1 spep2....like this .......post answer with professional skills in simple english words) thank u

0 Answers  






what is descriptive programming? what are the mandotory properties in qtp? what are libriry functions in qtp? what frame work you are using at your project? what is object repositery? what is our role as per qtp project is concerned as a software tester?

3 Answers   Wipro,


There is one login screen,after accepting valid username and apassword, it will show the next screen. In the 2nd screen u r having 2 combo boxes, U have to select any item from these, and click OK button. After closing that, it will show the 3rd screen. If u click CANCEL button from 2nd screen it will show the first screen. Write QTP script for it???

1 Answers   Sonata,


wt is the use of multiple questions in QTP

0 Answers   DigiTech,


Hybrid framework supports Descriptive programming. Is it true?

0 Answers  


Could someone explain me how to work on Out put values, explain with some example on Flight Reservation. I want to insert the out put value for the order No. Please explain the steps with some example.

2 Answers  


How many types of parameters are available in quicktest professional?

0 Answers  


write the vb script for call to new action in qtp?

0 Answers  


Categories