Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How many ways we can use external XL sheet data import in to runtime datatable
#2
Not Solved
Hi govQa,

You just forgot couple of points in your example.

1)Instead of datatable.setcurrentrow(i) ...... give Datatable.GetSheet("Dtsheet").SetCurrentRow(i) as shown below.
2) FYI..If you are running the script using the Getrowcount thru For Loop...then in File --> Settings -->Run Tab , Select "Run On One Iteration" RadioButton --> Apply -->OK.

Now Try to Execute the code given below & see.....

Example:
Code:
Dim rcount,i, Fdate, Cname, etc...

Datatable.AddSheet("Dtsheet")
datatable.importsheet("C\...\data.xls","sheet1","Dtsheet")

rcount = datatable.getsheet("Dtsheet").getrowcount

for i = 1 to rcount
datatable.Datatable.GetSheet("Dtsheet").SetCurrentRow(i)
Fdate = datatable.value("flydate","Dtsheet")
.
.
.
Cnmae = datatable.value("cname","Dtsheet")
,
,

window("flightReservation").active
window("flightReservation").ActiveX("MaskEdBox").type "Fdate"
...
..
Next
Reply


Messages In This Thread
RE: How many ways we can use external XL sheet data import in to runtime datatable - by sreekanth chilam - 02-18-2009, 11:09 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Search and import data from excel under some rules. nwpulele 2 2,775 02-19-2015, 04:10 AM
Last Post: supputuri
  Exporting QTP runtime datatable to SQL server during SweetyChowdhury 1 3,117 05-10-2013, 03:41 AM
Last Post: sria123
  data sheet row count rushil 2 7,433 12-07-2012, 03:10 AM
Last Post: rushil
  Does QTP support writing runtime data to multiple sheets in excel Shwethareddy 2 3,565 10-16-2012, 12:20 PM
Last Post: Shwethareddy
  Coloring cell of runtime datatable indranilgoswamimcb 3 10,679 08-03-2012, 03:51 PM
Last Post: SteveS

Forum Jump:


Users browsing this thread: 1 Guest(s)