How to detect the string with '+' in the name in excel and remove it?

excel

#1

Hello,

I am very new to UiPath. I have the data from excel with values as 10+, 12+ from a particular column. I have to perform a check to search such values and remove the + from the value and store it back as an integer value only. eg: 12+ will be stored as 12 only. or 0.8+ will be stored as 0.8 only.
Please let me know how can this be done? Your input will be really helpful.

Regards,
Komal


#2

Hi @Komal_Joshi,

strValue.Replace("+","")

Regards,
Arivu


#3

Thank you. It is done.
Can you please let me know how I can insert these updated rows in the datatable that I am outputing after removal of rows to Write Range method?
I have 3 conditions if matched that removes the rows. and I have 4th condition that if matched removes +. Now I have to club the output I have got after removing + with the data table that has removed rows and heading to write range as Input. Please provide some inputs to work this out.


#4

Hi @Komal_Joshi,

use Read Range activity to get the data to Datatable.

using for each row activity loop through it
update the value using assign activity
row("ColumnName")= row("ColumnName").Replace("+","")

after loop use write range activity to update the data in excel.

Regards,
Arivu