Replace excel function

Hello everyone,
I want to replace a string in excel with another string.
I will use the new table to automate a web app
How to do that with uipath ?

Hi there @Youssef

Seems like there is a disconnect in your second and third sentence. Please provide more context and more details you provide you can expect the solution to be more precise:)

Regards

1 Like

I am using an excel file data to automate a web app.
The column name contains this word " L'Assuré"
I want to replace the word “L'Assuré” with “L’Assuré” before reading the data from excel.
got it ?

Fine
–use excel application scope and pass the file path as input
–use read range activity and get the output with a variable of type datatable named out_dt
–use a assign activity like this
out_dt.Columns(“L’Assuré”).ColumnName = “the name you want”

But one thing, here in this statement
The column name contains this word " L’Assuré"
I want to replace the word “L’Assuré” with “L’Assuré”
both looks same, fine you can replace the name of the column as suggested above

Kindly try this and let know for any queries
Cheers @Youssef

Sorry I want to replace “L’Assuré” with " Lapos&Assuré"

Fine you can mention that as you want
Kindly try and let know
Cheers @Youssef

1 Like

How about replace rows value under column?

well you can do like this with a assign activity
row(“yourcolumnname”) = “value you want to replace”
Cheers @Youssef

I if rows contains “x” then replace “x” with new value

use a if condition like this
row(“columnname”).ToString.Contains(“x”)
if this condition gets passed it will go to THEN part of if condition where you can mention like this
row(“Columnname”) = “x”
If not it will go to ELSE part and go to the next row in the datatable
Cheers @Youssef

2 Likes

still any issues buddy @Youssef

1 Like

Hello, I have something on the same area.

  1. I have a column named “CUI” (column D) which includes the fiscal codes from several suppliers: RO 1245789 (D2), RO8984927 (D3) and so on. I would like to replace “RO” with “nothing” so that remains only the number (1245789).

  2. for the same table, I have column “Value” (F) with values. I need to remove “,” which divide the thousands (e.g. 1,324.54 must be 1324.54). Same I need to remove “.” (8.934,32 must be 8934.32).

Thank you very much!

HI @cristian.tudor,

Welcome UiPath Community !!!

Here is an activity called “Find Replace”. it helps you to replace the specific text.

Regards
Balamurugan.S

Thank you!
I am a fan of Balareva and it works for replacing “RO”. However, it does not work for replacing “,” . For example, I have the column A (Valoare totala) as follows:

Valoare totala
42,312.12
3.827,98
138.316,08
1289.45
7.383,95

When I ask to replace"," it will replace it everywhere and I need to keep the comma for the decimals. I need to replace “,” only for thousands.

1 Like

HI @cristian.tudor,

Thank you …

Is it possible to share an example excel sheet? to test at my side with your situation.

Thank you
Balamurugan.S

Yes, of course. Unfortunately, it is saying that “new users cannot upload attachments”. Do you guide me on how I can share it with you? Many thanks!