Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
data sheet row count
#1
Solved: 11 Years, 3 Months, 3 Weeks ago
I am using the below steps to get the rows count of a table. Instead of printing once the vlue of the rows count the print statment is printed "rowVal" times. That is if I have 8 rows in the data sheet it prints 8 times. Any help appreciated.
Thank you

Code:
DataTable.ImportSheet "C:\QTPD1\QTPcomplete\flights.xls" ,1 ,"Global"
rowVal = DataTable.GetSheet("Global").GetRowCount
print "there are "&rowVal & " rows in the table"
Reply
#2
Solved: 11 Years, 3 Months, 3 Weeks ago
Under Test Settings\Run you have it set to run on all rows, change this to Run one iteration only.
Reply
#3
Solved: 11 Years, 3 Months, 3 Weeks ago
Thank you. It worked.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Searching for and selecting row in Datawindow zsl0009 0 2,810 08-04-2015, 01:02 AM
Last Post: zsl0009
  Write Status of each row in DataTable dlaureano 2 3,512 11-29-2012, 05:53 PM
Last Post: dlaureano
  How to recognize table row and column siwani 4 5,036 04-05-2012, 05:06 PM
Last Post: verma.vik6
  How to save Runtime data value in an Excel sheet(specific column) SweetyChowdhury 2 7,758 11-12-2010, 01:05 AM
Last Post: Anu123
  How to get row count if xls file is generating dynamically. iamsekhar 10 10,387 08-26-2010, 12:08 PM
Last Post: iamsekhar

Forum Jump:


Users browsing this thread: 2 Guest(s)