Micro Focus QTP (UFT) Forums
Exporting 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: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: Exporting datatable (/Thread-Exporting-datatable)



Exporting datatable - Sivapratha - 04-08-2011

Hi Ankur,

I am working on an automation project. Here I am trying to export data from datatable to an excel sheet.
I am able to export the complete datatable.
But my requirement is... During run time I need to export every 100 rows into an excel sheet and continue the execution.
Also the next 100 rows should be appended to the already exported excel sheet (not to overwrite the already exported content)
Is it possible? If so how?

Also in the automation project I am working on, the login session gets expired after few hours (not sure abt the inactivity period)
Please suggest how can I handle this?

Thanks in advance,
Sivapratha


RE: Exporting datatable - basanth27 - 04-08-2011

Siva -
Yes it is possible to write and append the already edited content both during runtime as well editing an existing sheet. You can either read excel as a Database and use the recordset object to write and then use the movenext to move to the next row or you can use the primitive excel API to interact with excel and write the data in the loop.

Please open a new thread for your second question.