02-13-2008, 11:35 AM
You need to use Automation Object Model(AOM)
try this code:
try this code:
Code:
Dim filepath, sheet,row,column,value
filepath= "C:\qtp_test.xls"
Set ExcelObj = CreateObject("Excel.Application")
ExcelObj.Workbooks.Open filePath //opens the excel from desired path
Set NewSheet = ExcelObj.Sheets.Item(sheet) //selects the sheet from workbook
value = NewSheet.Cells(row,column) //gets the value of a specified cell
ExcelObj.Application.Quit
Set ExcelObj = Nothing
msgbox value
Want to fast track your QTP/UFT Learning? Join our UFT Training Course