Split string in 10th position and add to excel

I want to split in 10th position and add to excel How to do that.

Example:8642425151864242515286424251618645276024
Expected Output
8642425151
8642425152
8642425161
8645276024
Regards,
Hima

@thima
Splitting can be done as we described here in of your Topics:

the result can be used e.g. within an Object Array, which can use for a add datarow activity.
finaly we write the datatable to Excel with write range

In case of you need more help, just let us know the target Datacolumn structure of the datatable

2 Likes

Hi @thima
I have attached the Zip file of xaml using substring method

Please take look at the xaml.

SubString.zip (9.7 KB)
Main.xaml (9.5 KB)

Please mark it as solution if its valid.

Thanks

Use this below regex single code,
@thima
System.Text.RegularExpressions.Regex.Matches(“8642425151864242515286424251618645276024”,“\d{10}”).Count
you can use “.Count” to check the matches.
And for value - System.Text.RegularExpressions.Regex.Matches(“8642425151864242515286424251618645276024”,“\d{10}”)(0).ToString.Trim
Hope this may help you :slight_smile:

1 Like