How to deal with condition(change "Man" to "1")

I have excel file that contains datatable
and inside datatable , there is a data “man”

but i have to change all “man” to “1”
in this case, what kind of activities should i utilize??

Hi @Seonyong

Use if condition
Row (“columnname”).Tostring.contains(“man”)
Use write range to iterate the rows to man
Thanks
Ashwin.S

1 Like

Hi @Seonyong,

you have 2 options.

1.use excel application scope and try to Ctrl+H find and replace method.

2.use read range activity get the data into datatable…loop through it check the value “men” matching update the value. and use write range to update the datatable

Regards,
Arivu

1 Like

Thanks for reply but actually i just started using UIPATH could u specifically mention how to make
"loop through it check the value men mathing update the value. and use write range to update the datatable part??

Hi @Seonyong
Use read range activity and in properties create a datatable in datatable property
Use for each row activity and assign datatable value
Inside the body use if activity and apply the conditions above
Thanks
Ashwin.S

1 Like

thanks!!

1 Like

Hi
U can use the linq and u can filter it out as per ur requirement.

Datatable. Select(“column name=‘man’”)

Regards
Amy