Replace a word in excel

How to replace a word in excel using Invoke code

1 Like

Hope these steps would help you resolve this
—use output datatable activity and pass the datatable variable as input and get the output with a variable of type string named in_str
—now use a assign alike this
In_str = In_str.ToString.Replace(“wordtobefound”,”wordtobereplacedwith”)

—now we can use GENERATE DATATABLE ACTIVITY and pass the in_str string variable as input and get the output with a datatable variable

Simple isn’t it
Cheers @Sweety_Girl


No… I need invoke code for it…
This is due to… I used generate datatable …It gives the whole datatable in that A column
That is not the only reason… The excel has certain color which I wont get while using datatables in it and I need only one value to be changed in the whole excel…

If it is fixed cell, then use write cell activity and write the value to that particular cell

or just retrieve the value of that cell using read cell and do string manipulations and then use write cell to that same cell @Sweety_Girl

1 Like

Can you elaborate your requirement so that I can send you the code @Sweety_Girl

I have a excel which has a word which appears only once in that sheet…
I need to change that… If I am using the generate data table, the format and color of that sheet will change definitely

1 Like

Fine do we now exactly where it will be i mean the cell position
Cheers @Sweety_Girl


If No, How can we change the value?

then we need to go for INVOKE VBA
Cheers @Sweety_Girl

Please help me with that

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.