Excelactivitesin uipath

While using excel if we are having some data like Delhi, Bangalore in one column can we replace comma with or in Excel sheet

You can do it in multiple ways
in excel you can go to data tab on ribbon and select Text to column, then you can choose the delimiter as “,” ans then you’ll get the values splitted

in UiPath →

You can read the data using Read Range
Loop it using For Each Data Row

then for that column you can take the value in a variable, using row(“columnName”).tostring

row is the for each data row variable, can be different for you

then you can use split function
yourTxtVariable.Split(“,”)

This will give you an array, that array element csn be accessed using their index
arrData(0).toString
arrData(1).toString
and so on

Hi @Jyothi1

Welcome to Community!

I have created a sample work flow based on your use case!

Refer below!

ColumnValue_Replace.xaml (6.5 KB)

Regards


There how can we replace comma with or

actually that file is not opening

how can i refer plz give the solution

i did this with bala reva there we can find and replace the text but its not giving the output and also there were no errors just executing the bot but in the excel there were no changes

Hi @Jyothi1

Refer the steps below.

Read Range the Excel using Read range Activity.

For Each row in datatable of read range DT

Use Assign

Currentrow(“YourColumnwithComma Separted Value”)=if(CurrentRow(“YourColumnwithComma Separted Value”).ToString.contains(“,”),CurrentRow(“YourColumnwithComma Separted Value”).ToString.Replace(“,”," or"),CurrentRow(“YourColumnwithComma Separted Value”).ToString)

Then Write Range with Read range path and read range Dt.

Regards

thank you so much for ur efforts about this doubt.i will work on it if i get the answer i will intimate

Hi @Jyothi1

Does its helps for you?

Regards

yeah ,will u please help me regarding my doubts can u share ur knowledge

may i know ur contact details to communicate

@Jyothi1

Please mark solution to the post which you find useful and close this thread so it may helpful for others!

Regards
Calvin

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