Micro Focus QTP (UFT) Forums
data transfer across sheets of 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: data transfer across sheets of datatable (/Thread-data-transfer-across-sheets-of-datatable)



data transfer across sheets of datatable - ajay.r1982 - 07-02-2009

hi,
i have 10 rows of data in global sheet of datatable.
i want to transfer all the data to the local sheet.
how can i do it ?


cheers,
AJ


RE: data transfer across sheets of datatable - desimunda - 07-02-2009

Code:
Dim rCount

rCount = datatable.GetSheet("Global").GetRowCount

For i = 1 to rCount

DataTable.SetCurrentRow(i)
DataTable.Value("ColumnA", "Action1") = DataTable.Value("ColumnA", "Global")
DataTable.Value("ColumnB", "Action1") = DataTable.Value("ColumnA", "Global")
DataTable.Value("ColumnC", "Action1") = DataTable.Value("ColumnA", "Global")

Next


That should work!