Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need help
#2
Not Solved
Hi Dinu,

We can solve your issue by following the below steps.

1. Import the Excel to QTP using [Datatable.Import "File Path"]
2. Find the row count in excel using [Datatable.GetRowcount]
3. Use the for loop to fetch the data from the excel [For temp=1 to rowcount Step 1
Datatable.setcurrentrow(temp) 'to fetch the corresponding row record i.e temp
4. Pass the value to windows object.

Ex: You have a object WinEdit to insert data then follow as per the below code.

Code:
Datatable.Import "File Path"
intrcount=Datatable.GetRowcount
For temp=1 to intrccount-1 step 1
Datatable.SetcurrentRow(temp)
Window("xxxxxxxxxx").WinEdit(xxxxxxxxxxx").Set Datatable.Value("Parameter Id","Sheet ID")
Next
Note: Here "Parameter Id" means column name in excel
Sheet Id means from which sheet you are fetching the data.


Please let me know for further clarification.

Regards,
Venkat.Batchu.
Reply


Messages In This Thread
Need help - by dinakargonuguntla - 08-11-2010, 01:08 AM
RE: Need help - by venkatbatchu - 08-11-2010, 09:47 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)