Replace text in Excel

Hello,
I want to replace a word in column A. I used the Replace activity and saved the Output String in a new Data table. But when I use Write Range activity, I get the whole information from each row in column A and not only the word I want to replace.

To me it looks like you are using a csv or something simillar
Replace the write range with write csv activity and select ‘comma’ as delimiter

No, it’s an Excel file.
Can I use a delimiter in an Excel file too?

Yeah, you can see it in action there too
Try to open the excel, select the whole column A from top to bottom, go to “Data” tab inb excel and there go to ‘Text to columns’. From there select comma and click next and finish. Then you should see how your excel should look like if the commas are representing columns

Okay, it worked. But how can I do this in UiPath?

Hi @

Fine
—use a excel application scope and pass the file path as input
— use a read range activity and get the output as a variable of type datatable
—use output datatable activity and pass the above variable as input and get the output as a variable of string named out_Text
— now use assign activity with out_Text.ToString.Replace(“your value to be replaced”,”value to be replaced with”)
Or use a replace activity as you did earlier
— then use a generate datatable activity and pass the above string variable as input and get the output as a datatable variable
—use a write range activity and pass the above obtained Variable from the generate data table activity
Hope this will help you
Kindly try this and let know for any queries or clarifications
Cheers @Loons

I did it the same way, but in the Excel file it always looks like the picture above. There’s always the whole data in column A.:thinking:

So may I know what was the issue you were facing
Cheers @Loons

This is my Excel file now.
The whole data is now in column A, and not only the replaced word.