You can use the below code.
Set objxl=CreateObject("excel.application")
Set objwb=objxl.Workbooks.Open("Path of the excel sheet")
Set objsht1=objwb.Worksheets("Sheet1")
Set objsht2=objwb.Worksheets("Sheet2")
Set objsht3=objwb.Worksheets("Sheet3")
Set objsht4=objwb.Worksheets("Sheet4")
Set objsht5=objwb.Worksheets("Sheet5")
' To know the no.of rows used in sheet1
cnt=objsht1.usedrange.rows.count
'To take a value from 1,2 cell
var=objsht1.cells(1,2).value
objwb.save
objwb.close
set objwb=nothing
set objxl=-nothing
Regards
Uma Mahesh
8939192903
--
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en