Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Retrieving test data from Excel sheet
#8
Solved: 11 Years, 4 Months, 4 Weeks ago
Hi Janris,

In your question given above you have just asked for 3 columns A,B,C. So I took that example code Smile

You can use the below statements to the above code.
Row_Count=xl.ActiveSheet.UsedRange.Rows.Count
Code:
For i=1 to Row_Count
    UserId=xl.Cells(i,1).value
    FirstName =xl.Cells(i,2).value
    LastName=xl.Cells(i,3).value

     Browser("...").Page("...").WebEdit("UserId").Set UserId
     Browser("...").Page("...").WebEdit("FirstName ").Set FirstName
     Browser("...").Page("...").WebEdit("LastName").Set LastName     Next
xl.ActiveWorkBook.Save
xl.Application.Quit
Set xl=nothing
Reply


Messages In This Thread
RE: Retrieving test data from Excel sheet - by sreekanth chilam - 01-28-2011, 11:54 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Multiple rows of test data Bhuvana 0 1,358 01-03-2020, 09:30 PM
Last Post: Bhuvana
  Want to read the data from excel and set read value in the JavaTable rajeevk7 0 2,355 07-10-2017, 04:20 PM
Last Post: rajeevk7
  dtLocalSheet empty even though excel file contains data cantorre 2 2,451 05-10-2017, 12:47 PM
Last Post: vidhi
  Reading data from excel sheet serenediva 1 9,696 03-03-2017, 10:07 AM
Last Post: vinod123
Question QTP not performing iterations based on local data sheet Breaker 18 56,959 01-25-2016, 04:32 PM
Last Post: arunshuklainbox

Forum Jump:


Users browsing this thread: 8 Guest(s)