How to separate two group of numbers in an excel column?

Hi,

Im trying to find a way and solution to split the number into 2 group and write into another column.

if each 6digit in a row no issue to read, but when comes to 6digit*6digit of number would be difficult.

image

Thanks.

Hi @Alfred_Gan in for each row loop you can check column values.contains(“*”)

If it contains “*” then split it to

split(ColumnValues,“*”)(1)

Store this values into a variable and write that into another column.

hi @Tapan_Behera1

Possible to advise over the xaml file as case study?

example.xlsx (8.9 KB)

Filter_DT_BasedOnDate.xaml (7.5 KB)

Thanks.

HI @Alfred_Gan

You can try with Regex Expression

You checking the * in the column use this IsMatch expression in the If activity

System.Text.RegularExpressions.Regex.IsMatch(CurrentRow("Column1").ToString,"\*")

To get the Data from the string

System.Text.RegularExpressions.Regex.Match(CurrentRow("Column1").ToString,"^\d+").ToString

It will get the before * 
System.Text.RegularExpressions.Regex.Match(CurrentRow("Column2").ToString,"(?<=\*)\d+").ToString

It will get the After* 

Check out the XAML file

Instead of Build Data Table use Read Range activity

UpdateDatatable.xaml (9.9 KB)

image

image

Regards
Gokul

Share the output format @Alfred_Gan

Okay let me …do

Hi @Alfred_Gan ,

use read range to get as datatable.
dt1= dt.select("ColumnName like '%*%'").CopyToDataTable()
dt2= dt.select("ColumnName not like '%*%'").CopyToDataTable()

Regards,
Arivu

HI @Alfred_Gan

Check out the XAML file

UpdateDatatable.xaml (12.6 KB)

Output

image

Regards
Gokul

@Alfred_Gan find this attachment

Filter_DT_BasedOnDate.zip (2 KB)
example.xlsx (8.3 KB)

Hi All,

Actually im trying to copy this JOB NO into another platform,

but the platform system couldnt recognize if i copy for example 954178*954179

possible to copy 1 at each time to the platform, and following by the number behind after *?

Then goes on to another column by column.

Thanks.

Check out this XAML file @Alfred_Gan , Based on the requirement i have create the sample xaml file have you checked?

1 Like

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