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.
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.
- How to export datatable sheets to excel
- How to import excel-sheet to datatable
- How to read value from cell in datatable in QTP
- Explain setcurrentrow method in qtp
- Datatable object in qtp
- How to export datatable to excel in qtp
- How to get current sheet from datatable
- How to check if parameter exists in sheet in datatable in qtp
- Explain dtsheet object in qtp
- What are the utility objects in qtp
No comments:
Post a Comment
Please Leave your reply. We value your feedback and inputs