Interview Questions   Tutorials   Discussions   Programs   Videos   

QTP - How to retrieve data from the data table?




314
views
asked marvit August 20, 2014 12:19 AM  

How to retrieve data from the data table?


           

1 Answers



 
answered By Dharma   0  
Name              Age
Manish             26
Raghavendra     30
Aruna               25


Script to Read data from data table
datatable.AddSheet “localsheet”
datatable.ImportSheet “C:\Users\qtp\Desktop\fromexcel.xls”, “sheet1″,”localsheet”
exceldatacount=datatable.GetSheet(“localsheet”).getrowcount
For i=1 to exceldatacount
datatable.SetCurrentRow(i)
varname=datatable.Value(“Name”,”localsheet”)
varage=datatable.Value(“Age”,”localsheet”)
msgbox varname & ” ” & varage
Next

flag   
   add comment

Your answer

Join with account you already have

FF

Preview


Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!

Alert