Micro Focus QTP (UFT) Forums
How to replace data in DataTable of QTP? - 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 replace data in DataTable of QTP? (/Thread-How-to-replace-data-in-DataTable-of-QTP)



How to replace data in DataTable of QTP? - ShrikantBiradar3449 - 04-23-2012

Hi Friends,

I import an excel sheet in a driver script from QC.

Ex.DataTable.ImportSheet strSourcePath, "Expected_Results", strExpectedsheetName


Now I want to perform a replace operation on the imported data of DataTable

Ex. I want to replace all “&Machine_Date” with the value “24/04/2012” in the current DataSheet

What should be the easiest and fastest approach?

I want to avoid looping through all columns and rows, it will awfully decrease the script performance.

Waiting for your valuable suggestions.




RE: How to replace data in DataTable of QTP? - Shridevi.Salagare - 04-30-2012

To get the data from the dataTable anyways you need to iterate through the dataTable ,so for this loop is required.