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")

DataTable.ExportSheet("filepath","DTsheet")

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

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

     Datatable.exportsheet("c:\name.xls",1)

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.

--Subbu.

RSS

TTWT Magazine


Advertisement

Advertisement

Advertisement

Advertisement

© 2021   Created by Quality Testing.   Powered by

Badges  |  Report an Issue  |  Terms of Service