
how to split word and number ( NRS 1200 ) of excel column price in UiPath
Hi @Bammy
Use this in Invoke Code activity
DT.AsEnumerable.ToList.ForEach(Sub(r)
r(3)=r(3).ToString.Split(" "c).Last()
End Sub
)
Cheers!!
You can use SPlit method also Split with space
Then you can assign those and use them as required.
Hi @Bammy
=> Build Data Table

Output-> resultTable
=> Read Range Workbook

Output-> dt
=> Use below syntax in Assign:
resultTable = (From row In dt.AsEnumerable() Let parts = row.Field(Of String)("Price").Split(New String() {" "}, StringSplitOptions.RemoveEmptyEntries) Select resultRow = resultTable.Rows.Add(parts.FirstOrDefault(), If(parts.Length > 1, Integer.Parse(parts(1)), Nothing)) ).CopyToDataTable()
=> Write Range Workbook dt

Hope it helps!!
Please try this
DT.AsEnumerable.ToList.ForEach(Sub(r)
r(4)=r(3).ToString.Split(" "c).First()
r(3)=r(3).ToString.Split(" "c).Last()
End Sub
)
Input:

Output:

Cheers!!
Hi @Bammy
Input:-
Output:-

Xaml File:-
Split datacolumn forum.zip (3.6 KB)
If this works for you, please mark it as a solution. So others can refer the same.
Thanks




