Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Code won't stop looping through imported spreadsheet
#5
Solved: 12 Years, 10 Months, 3 Weeks ago
Hi Mike,

Here there are two ways has to be noticed by all of us.

1 st way :
In file-Settings-->Run tab, by default "Run on All rows" will be there.
That means, if there are 'n' number of rows are stored in datatable's Global Sheet then entire script will be running "n' number of times.

2 nd way :
If at all we wont have any data in datatable's Global sheet & we are importing the data from an external spreadsheet.

Then initially we should select "Run one iteration only" option in file-Settings-->Run tab.,

datatable.import "../../../.xls" ' ---> import the data into current global sheet

rc= datatable.getrowcount ' ----> retrieve the rowcount of global sheet (this much number of times we are running the test script by using the loop)

for i=1 to rc ' ----> start of loop
datatable.setcurrentrow(i)
...............
..............
next ' ----> end of loop

we should either follow 1st or 2nd way but not mixing the both ways ......

@ Mike : I hope your query has been solved .......
Reply


Messages In This Thread
RE: Code won't stop looping through imported spreadsheet - by sreekanth chilam - 01-08-2009, 03:28 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  how to use looping statement dmvelic083185 1 1,648 09-26-2017, 08:46 PM
Last Post: Ankur
  Execute button of putton won't be clicke automaticly in UFT (VB) MarUFT 3 3,162 11-21-2016, 04:22 PM
Last Post: Ankur
  Invalid File error importing a spreadsheet but only on a VM msacks 1 3,168 10-19-2014, 09:04 PM
Last Post: supputuri
  Perform some functions whenever QTP Stop button is pressed smartkarthi 2 3,710 08-22-2013, 11:43 AM
Last Post: smartkarthi
  How to make QTP take the value of a formula in a spreadsheet? utestqa 1 3,587 07-06-2013, 04:13 PM
Last Post: Ankur

Forum Jump:


Users browsing this thread: 1 Guest(s)