Regex format

Hi,

The above Samepl20220510-2v3.zip supports mulitple columns.
Can you try the sample? (rename your file to data.xlsx and rename sheet to “Sheet1”, for example)

Regards,

Note that the columns start with G and end with L, and the corrected data has to be written in the same cells.

Hi,

The following will help you.

Sample20220510-2v4.zip (9.1 KB)

Regards,

Use Regex Storm when creating regular expressions that work in UiPath. It will make it a lot easier.

UiPath uses a certain kind of regex engine and Regex Storm uses the same one. Regexr does not have the same engine so it’s not as easy to use.

But Regex Storm uses HTTP so don’t put any confidential information in there. Well you shouldn’t put any confidential information in any online regex builder ANYWAY!

what type is the variable cols??

Hi,

It’s array of String.

Regards,

I got it .

in the secod for each mark this error.

Hi,

Can you try to set String at TypeArgument of ForEach?
And you can check it from the above Sample20220510-2v4.zip.

Regards,

mark this error

Can you share content of $ExceptionDetail at Locals panel?

Hi,

The content is out of the frame. can you click “view more” and share whole content of $ExceptionDetails

Hello @alexis.mendoza

I think the easy approach would be like below:

1. Read excel into datatable dtInput
2. Use 'Output Data Table' activity to convert dtInput to text (assign it to str_dtInput)
3. Use regex with replace like below
	str_dtInput = System.Text.RegularExpressions.Regex.Replace(str_dtInput.ToLower,"[^0-9x,]","")
4. str_dtInput = str_dtInput.ToLower.Replace("x"," x ")
5. Use 'Generate Data Table' activity to convert str_dtInput  into datatable assign

Let us know if this works for you

yes

Hi,

This error shows Column “elemt 1” doesn’t exist in your datatable. Please make sure items of cols are same as column name in excel. (and/ or turn on AddHeaders option of ReadRange activity)

Regards,

at the time of writing the result write this.

Hi,

Can you attach your input file (workbook file)?

Regards,

Book1.xlsx (22.7 KB)
yes

Hi,

In my environment, it works well.

Can you also attach your xaml file?

Regards,

great, got it, success.

I found my mistake and now it works.

Could you please explain to me how this command works?