Quality Testing

Quality is delighting customers

Hi I want to know is there any way to export QTP results to excel file. Does QTP provide any functionality/Methos to export ResultSet into excel file.  

Thanks & Regards,
Robin Tyagi

Views: 1836

Reply to This

Replies to This Discussion

DataTable.Export("file path")


DTsheet:index or name of the sheet which u want to export to excel file.

Ex: Datatable.Exportsheet("c:\name.xls","name")


I want to export Result Set into excel. All these method which you are telling are used to export datatable data into excel sheet not of result set.

Hi Robert,

You might want to try this

Function WriteResults(sTablePath,sNumber, intRowCount)

  Datatable.addSheet "Sheet1"

  Datatable.importSheet sTablePath, "Sheet1","Sheet1"

  Datatable.getSheet("Sheet1").setCurrentRow(intRowCount )

  Datatable("<column_name>","Sheet1") = sNumber

  Datatable.ExportSheet sTablePath,"Sheet1"

End Function

Save this code as a .vbs file and call the function where ever needed

I believe you are looking this:

Select File menu in HP Run Results Viewer

Select Export To file

Select Format (HTML / Doc / XLS) to export QTP Test Results.



TTWT Magazine





© 2021   Created by Quality Testing.   Powered by

Badges  |  Report an Issue  |  Terms of Service