Micro Focus QTP (UFT) Forums
Output to 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: Output to DataTable (/Thread-Output-to-DataTable)



Output to DataTable - bgold01 - 05-25-2012

Hi. I am writing data to a datatable. There are 2 entries I'm trying to write out. The first entry writes to the table with no problem. I added a DataTable.SetNextRow before writing the second entry. however, the second entry overwrites the first and when the file is exported, there is only on row of data in the table. What do I need to do to get the second entry add to the table on the second row? Thanks.l


RE: Output to DataTable - petes85gt - 05-25-2012

You can do something like this:

Code:
For startRow=1 to 2
    DataTable.GlobalSheet.SetCurrentRow(startRow)
'Rest of your code here
Next



RE: Output to DataTable - bgold01 - 05-25-2012

Excellent Pete. It worked perfectly. Thanks for your help!!