Wednesday, 13 March 2013

How to Export Datatable to Excel in QTP

Datatable object in QTP has 2 methods which help us to export datatable sheets into excel sheet.

Example - Below Code will export all sheets from datatable to excel workbook.

DataTable.Export ("C:\export.xls")

The following code uses the ExportSheet method to save the second sheet of the run-time Data Table to the mysheet.xls.

DataTable.ExportSheet "C:\mysheet.xls" ,2

If excel file doe not exist, new file is created.

You may find below links very useful if you want to know more about data tables in QTP.
  1. How to export datatable sheets to excel
  2. How to import excel-sheet to datatable
  3. How to read value from cell in datatable in QTP
  4. Explain setcurrentrow method in qtp
  5. Datatable object in qtp
  6. How to export datatable to excel in qtp
  7. How to get current sheet from datatable
  8. How to check if parameter exists in sheet in datatable in qtp
  9. Explain dtsheet object in qtp
  10. What are the utility objects in qtp

No comments:

Post a Comment

Please Leave your reply. We value your feedback and inputs

Best QTP Books

Everything About QTP

Hello Friends,
You can find QTP study material, Multiple choice questions (mcq), QTP question bank, QTP question papers, QTP notes, QTP questionnaire, scenario based QTP interview questions, QTP tutorial and QTP training on this site.

If you are a fresher or experienced QTP professional with (1/2/3/4) years of experience, this blog is just for you.