Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to replace data in DataTable of QTP?
#1
Solved: 11 Years, 4 Months ago Rolleyes 
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.

Reply
#2
Solved: 11 Years, 4 Months ago
To get the data from the dataTable anyways you need to iterate through the dataTable ,so for this loop is required.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  On Saving Script in QTP 11 my Global Data Sheet data is removed M Adnan Iftikhar 0 2,182 06-02-2015, 09:19 PM
Last Post: M Adnan Iftikhar
  Function writes data from datatable to database Fairbanks 0 2,593 06-27-2014, 07:51 PM
Last Post: Fairbanks
  Replace a string in a word document with another string rekha.naik 8 15,521 11-14-2013, 12:58 PM
Last Post: pranikgarg
  Importing data from Excel into Data table of QTP Chitti 1 4,911 11-01-2013, 05:54 PM
Last Post: Parke
  Retrieving data from Txt file into datatable kriday 3 5,838 07-23-2013, 11:04 AM
Last Post: vinod123

Forum Jump:


Users browsing this thread: 1 Guest(s)