Micro Focus QTP (UFT) Forums
export function is not working - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: export function is not working (/Thread-export-function-is-not-working)



export function is not working - diya - 12-18-2012

Code:
Function Export ()
'exporting the results to an excel sheet
Datatable.ExportSheet "C:\NewSheet.xls",2
Datatable.Value (1,2)= Browser
Datatable.Value (2,2)= Login
Datatable.Value (3,2)= Location
Datatable.Value (4,2)= name
Datatable.Value (5,2)= Results
Datatable.Value (6,2)= Record
End Function

Please help as how to export the values at the end of the script as this is not happening


RE: export function is not working - Ankesh - 12-18-2012

Use Datatable.Export "<FileName>" at the end.

Code:
Datatable.Value (1,2)= Browser
Datatable.Value (2,2)= Login
Datatable.Value (3,2)= Location
Datatable.Value (4,2)= name
Datatable.Value (5,2)= Results
Datatable.Value (6,2)= Record
'Now export the values
Datatable.Export "C:\TestExport.xls"
Regards,
Ankesh