Split numbers in a web extracted datatable and separate columns

Hello,

Please, I need some help.
I have a ‘DataTable’ extracted from a ‘DataScraping’ done in a website, this data will be written on an Excel sheet. In the column ‘Salary’ I need split the numbers and separate than in two columns “Minimum Salary” and “Maximum Salary”

Below the table generated using the ‘Write Range’ activity

The table need to look like this:

Any help would be appreciated
Thanks.

You can use this workflow to achieve your goal:

Processusvierge.zip (2,7 Ko)

Hello @Jeff_E,

A Regex + Linq solution from me.

add column "Minimum Salary"
add column "Maximum Salary"
for each row in datatable
    row("Minimum Salary") = String.Join("", Regex.Matches(yourString,"\d|-").Cast(Of Match).TakeWhile(function(x) Not x.Value.Equals("-")) )
    row("Maximum Salary") = String.Join("", Regex.Matches(yourString,"\d|-").Cast(Of Match).SkipWhile(function(x) Not x.Value.Equals("-")).Skip(1) )
remove column "Salary"

@Anthony_Humphries

Thank you so much, that works!

But only one problem, the value comes as a string, I need them as an Int to manipulate them on Excel.
Have a way to automatically solve this?
Look:

@alin.c.mihalea

Thanks!

A doubt I have to put this code in assign activity ?
Datatable = your code

The catch is that if it is written as an int, it will not include decimals, and anywhere there is a blank, a 0 would fill the cell. The workflow can be modified to do that, but those are the repercussions.

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