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



Writing values to DataTable - chewbecca - 03-12-2015

I'm new to the site - so please forgive me if this has been answered somewhere else. Smile

I'm using the following code to set a value on the Global datasheet - I see the value written during run-time, but after the execution is completed, the values are removed from the DataTable. Any chance someone can help me figure out what I'm missing? Ideally, I want this value to be retained after execution.

With the code below, I expect to write the contents of the variable DOC_NUM to the column labeled "DOC_NUM" on the Global datasheet:
Code:
Dim DOC_NUM

DOC_NUM = "12345"

DataTable.Value("DOC_NUM",dtGlobalSheet) = DOC_NUM



RE: Writing values to DataTable - babu123 - 03-17-2015

After the execution export the file


Code:
DataTable.Export  "c:\test.xls"



RE: Writing values to DataTable - chinnikrishna - 04-09-2015

Hi,

You cannot the see those records in the datatable in such case. you can see those records at your results.

1. Open the results
2. at right side click on the "captured data" or "data".
3. There you can find the data table.
4. Then click on the sheet in which you stored your data. then you can see your stored data.

Regards,
Chinnikrishna