How to separate data with 2 separators

Hai,
I need yor help. I don’t know im couldn’t find a solution. I want to separate this data.


To be like this.

I am confused because the data has 2 separator “ “spaces” and “/“. I need advice to solve it. Thank You

Hi @wsinten

can i get you excel file, so i can provide solution based on that
Regards

HI,

How about the following?

strData = String.Join(vbcrlf,dt.AsEnumerable.Select(Function(r) r(0).ToString))
strData = strData.Replace("/",chr(9))
strData = System.Text.RegularExpressions.Regex.Replace(strData,"(?<=\d{8,}\b)\s+|\s+(?=\b\d{8,})",chr(9))

Then use GenerateDataTable activity.

note: this assumes the 2nd column is 8 or more digits number.

Sample20230307-4L.zip (8.3 KB)

Regards,

Hai @fernando_zuluaga, thanks for your answer. This is the file.
Tets sparator.xlsx (8.5 KB)
I need your help make this data like this.
image

Thank you @fernando_zuluaga

Hai @Yoichi,

Thanks for your answer. But can’t use replace sir. because it will replace all the data forms

Hi,

But can’t use replace sir. because it will replace all the data forms

Can you elaborate?
The above sample outputs what you expect doesn’t it?

Regards,

Check this
BlankProcess4.zip (10.2 KB)

let me know if this is what you want

thank you for helping. but the result is not what I want, sir. because DEF GHI should be 1 cell. not separate. is there another way or not so that the result is like what I want? I’ve tried several ways but still not solved so the result is like this.
image

Hi,

Did you try my above sample? it returns what you expect as the following.

image

Sample20230307-4Lv2.zip (14.5 KB)

Regards,

Thanks @Yoichi, your solution works for me in similar kind of scenario with some modification according to situation :+1:t3:

1 Like

Hi @Yoichi sorry for late response. Thank you. Its work for me. Thank you

1 Like

Hi

Kindly mark @Yoichi post as solution, so other people with the same problem will reach the solution fastly
Forum FAQ - How to mark a post as a solution - News / Tutorials - UiPath Community Forum

Regards!

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