How to write QTP test results to an Excel application

Showing Answers 1 - 3 of 3 Answers

Subha

  • Jun 13th, 2006
 

You can use Excel.Application object to create and open the excel file, write the desired text and save.

  Was this answer useful?  Yes

Debashish

  • Jun 16th, 2006
 

I am Sending a sample example to this QS

Set Excelsheet=CreateObject(Excel.sheet)

Excelsheet.Visible=True

Excelsheet.Activesheet.Cells(1,1).Value=Variable

Excelsheet.Saveas"C:C.xls"

Set Excelsheet=Nothing

  Was this answer useful?  Yes

Guest

  • Jun 18th, 2006
 

In addition to the creation of the excel object, you can use the ADO concept as well as the inbuit dataexport function of QTP.

1) ADO : In this , you have to create one DSN through ODBC for the Microsoft Excel *.xls driver. Using this define ADODB.Connection and Recordset for the required excel which you want to update. Then simply you can update any column using Recordset.Updte concept similar in VB

2) DataTable.ExportSheet "C:name.xls" ,1

  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