Thread Rating:
  • 1 Vote(s) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to select imported rows from localdatatabel(runtime sheet)
#1
Not Solved
Hi,

This is my code.

Code:
For x = 1 to DataTable.GetRowCount
print x
'I am adding a sheet in my local datatable.
DataTable.AddSheet("DinInfo")
'Importing values from excel sheet,
DataTable.ImportSheet "C:\LCMan.xls","MyLi-DFa","DinInfo"
'I parmeterized the column:
DResut=(DataTable("In_Din","DinInfo"))
print Dresult
Next

If i print Dresult, it always give first row value why?,
It is not giving the second row value.

My resuls
x=1
Dresult=Din1


X=2
Dresult=Din1[Here I need second row value Din2]

Any help?
Thanks
Uma
Reply
#2
Not Solved
Hi Uma,

Ur code is fine, bt it needs slight modification.

U need to incremet the row to point to the next row. So u will have to use a row counter. Ur code shloud be something like this...

Code:
intRowNo=1  'Initialize a row counter
For x = 1 to DataTable.GetRowCount
print x
'I am adding a sheet in my local datatable.
DataTable.AddSheet("DinInfo")
'Importing values from excel sheet,
DataTable.ImportSheet "C:\LCMan.xls","MyLi-DFa","DinInfo"
Datatable.GetSheet("DinInfo").SetCurrentRow intRowNo  'Point the focus to the current row using the counter
'I parmeterized the column:
DResut=(DataTable("In_Din","DinInfo"))
intRowNo=intRowNo+1  'increment the counter
print Dresult
Next

I hope this would solve ur problem..

Regards,
Ankesh
Reply
#3
Not Solved
Hi Ankesh,
It is working with setcurrentrow
Thank you
Uma
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Multiple rows of test data Bhuvana 0 1,337 01-03-2020, 09:30 PM
Last Post: Bhuvana
  Adding data into rows that add dynamically with setcelldata azar81 4 5,916 04-13-2015, 05:24 PM
Last Post: vidya2k2
  Excel operation - to find usedrange of rows & col pooja 1 9,707 02-19-2015, 04:06 AM
Last Post: supputuri
  how to count rows and columns in csv file. venkatesh9032 1 2,797 02-18-2014, 01:28 AM
Last Post: supputuri
  UFT 11.52 - How to select multiple rows in webtable UFT_Tester 0 6,234 09-12-2013, 09:36 PM
Last Post: UFT_Tester

Forum Jump:


Users browsing this thread: 2 Guest(s)