Excel to QTP inbuilt data table

How to fetch columns data from excel to QTP inbuilt data table, if there is a columns contains Image type of data?

Questions by acmanju   answers by acmanju

Showing Answers 1 - 9 of 9 Answers

akothuru

  • Jul 21st, 2008
 

You can't able to import data related to Excel Object like Images/TextBoxes/Pie-charts.

Only You can access cell data from Excel sheet, nothing else.

Method 1: To access data from Excel sheet, use dataTable methods in QTP

Methods of DataTable
Import, Importsheet, Export, ExportSheet, GetSheet, SetCurrentRow etc...

E.g: DataTable.Import("C:abcd.xls")
dtRowCount = DataTable.GetSheet("Global").GetRowCount



Method 2: create Excel object using CreateObject method.

E.g:
Set ExcelObj = CreateObject("Excel.Application")
ExcelObj.Workbooks.Open "C:abcd.xls"
Set NewSheet = ExcelObj.Sheets.Item(1) 'first sheet
NewSheet.Cells(4,4) = "test" 'set the value to the excel cell
var_Value = NewSheet.Cells(5,4) 'retrieve value of the cell(5,4)


  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions