| || |
Looking for Find and Replace 2 Columns Data in Excel Datasheet
I have lots of UFT datasheet where I often have to manually update two columns when data changes, which is time consuming. So I was Looking to automate it.
To able to find and replace text in multiple Excel files in a directory for two columns with two different text values. Search and Find the text in a column B and replace it with text1, and same row replace text2 in Column A left to the Column B. I want to be able to loop through all my datasheets. Has anybody done this before.
I don't understand the specifics of the data manipulation of the sheets. In general here are some ways that you can do this.
Use VBA macros inside of Excel.
Use functions inside of cells of Excel.
Use the run time workbook inside of Excel. Import and Export workbooks as you need them. Collect Data, change it in work books. Save workbooks.
Use UFT to connect to multiple workbooks and sheets. You can read, write, loop, change, save as much as you want to.
Have done something similar to this, we have a vbs script which done all the find and replace in a short time. You can design VB Script which can be called whenever you want to do the replacement.
Can tell me how would I go about search a item in multiple excel files In a directory.
Originally Posted by venu.adhikesevan
I would create a workbook and worksheet object for each place that you will be working.
Then you can compare data between sheets using looping.
There is a lot of examples on the internet for working with VBScript and Excel. A starting point is:
Also there are examples in this forum.
Tarun's QTP Professional Unplugged book showed a few pages of examples. I do wish that this section of the book had more examples.
Originally Posted by bklabel1