Micro Focus QTP (UFT) Forums
how to import and export datatable - 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: how to import and export datatable (/Thread-how-to-import-and-export-datatable)



how to import and export datatable - Ishul - 03-29-2012

Hi all,

I want to import data from my datatable to excel sheet.
i have written like this
datatable.Import "D:\laxmi\Book1.xls"
which is giving error as:
A general error occurred while importing file D:\laxmi\Book1.xls.
Line (1): "datatable.Import "D:\laxmi\Book1.xls"".

please any one can help me out as how to import and export data from datatable.


Thanks in advance


RE: how to import and export datatable - Ankesh - 03-29-2012

The imported table must match the test. The column names must match the parameters in the test, and the sheet names must match the action names.

If you import an Excel table containing combo box or list cells, conditional formatting, or other special cell formats, the formats are not imported and the cell is displayed in the Data Table with a fixed value.

below is the code

Datatable.Import <FileName>

Regards,
Ankesh