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

Hi friends I need to know about jubula automation tool. Is anybody know in bangalore where jubula tanning class is going on do let me know. Its urgent for me to learn that tool please help.

0 Answers  


you are recording on "WINDOW 1", say it has a link if you click on that, that leads you to "WINDOW 2". If you do any manipulations on "WINDOW 2" that are automatically updated in to "WINDOW 1". But "WINDOW 1" is currently invisible. But the updations in "WINDOW 1" must also be recorded as a script in QTP. The best Example is if you update your resume in JOB STREET portal it actually happens in other window, but the previous window is automatically updated. Now does QTP help you in this types of situations? Any body can answer this question. please..... Siva

0 Answers   Covansys,


How QTP recognizes Objects in AUT?

1 Answers   Crea,


suppose there r 10 action in a test i want to execute action 5 to 10 how would i do that

2 Answers  


Is it possible to check the Run time value property of a field through a Database Checkpoint ? Further, is it possible to localize and mention a particular cell , in the database dynamically. My requirement is that I would need to check the status of a particular field , that would change from an "Active" state to a "Stopped" state dynamically.

1 Answers   CTS,






How do you test the different ads displayed in the Inbox home page of Yahoo. Once u login Yahoo mail, in inbox page there will a banner, where different ads are scrolling, how do you test that using qtp?

2 Answers  


How to use checkpoints in qtp ?

0 Answers  


Using Object Repository is a advantage or disadvantage?

6 Answers   Wipro,


I m new to QTP? Is it necessary to know VB for learning QTP for Automation? Can I understand QTP excellently Without practical automation?

3 Answers  


Any body have QTP 9.5 licence key. please provide me at madhukar_dec30@yahoo.co.in

0 Answers  


what QTP Options do you know?

0 Answers  


How to save your test using quicktest professional?

0 Answers  


Categories