Excel sheet data to data table in QTP

How can i bring an excel sheet data onto the data table in QTP and then how can i put the various columns in the table to test that whether the entries are the ones i gave in the excel sheet. Basically, it would involve scripting but i just need to know that how to go about it.

Questions by Dmehta2

Showing Answers 1 - 3 of 3 Answers

akothuru

  • Sep 5th, 2008
 

Use the method to import excel file or excel sheet using the following methods

DataTable.Import Excelfilepath
DataTable.ImportSheet Excelfilepath, Excelsheetname(or)number, DatatableSheet(or)number

Excelsheet number starts with 1.

Use the below method to check whether the given column names in excel sheet are updated in Datatable or not

var_Value = DataTable(Columnname,sheetname/sheetnumber/dtlocalsheet/dtglobalsheet)

Here / represents or

Definitely it should work if you give correct column name in the above method.
DataTable Column names are case sensitive. Make sure of it.

  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