Split numbers in a web extracted datatable and separate columns


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

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"


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?



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.