can anybody tell me what is the code to import data from excell .(qtp code)
DataTable.ImportSheet FileName, SrcSheet, DestSheet.
I would suggest that you go thru the Help file.
u can use either excel object or make use of sql to query excel.
set qtpExcelApp = CreateObject("Excel.Application")
set qtoExcelWbook = qtpExcelApp.Open "path os .xls file"
set qtpSheet = qtpExcelApp.Sheets.Item(1)
rowCnt = qtpSheet.UsedRange.Rows.Count
colCnt = qtpSheet.UsedRange.Columns.Count
for i = 2 to rowCnt
for j = 1 to colCnt
reqVal = qtpSheet.cells(i, j).
set qtpExcelApp = Nothing
set qtoExcelWbook = Nothing
What is your requirement, u need to retrieve a row from excel?...
Winds of Change
If its a single row we can do it using excel objects?.. is it correct to do so?
Actually its not for a single row. app i can say row count=100
so u wish to have the entire file loaded into qtp.