How to split value from datatable?

How to split value from datatable??

before

01 to 30
01 to 30
01 to 30
01 to 30
01 to 30
01 to 30
01 to 30
01 to 30

After

1 30
1 30
1 30
1 30
1 30
1 30
1 30
1 30
how to splite

startNumber = Convert.ToInt32(row(“Column_name”).ToString().Split(" “c)(0))
endNumber = Convert.ToInt32(row(“Column_name”).ToString().Split(” "c)(2))

~new.xaml (14.5 KB)
Refer this ,Hope it might helps you

Hi @domsmgtmeet22

Input:-
image

Output:-
image

Xaml file:-
Main.xaml (13.5 KB)

If this solution works for you, please mark it as a solution so others can refer the same…:slight_smile:

Thanks

Hi @domsmgtmeet22

=> Build Data Table
image
Output-> newDt

=> Read Range Workbook
image
Output-> dt
Note: Remove Add Headers Option in Read Range Workbook Properties

=> Use below syntax in Assign:

newDt = (From row In dt.AsEnumerable()
                Let splitValues = row(0).ToString().Split(" "c).Select(Function(x) x.Trim()).ToArray()
                Select newDt.LoadDataRow({splitValues(0), splitValues(2)}, False)).CopyToDataTable()

=> Write Range Workbook newDt
image


Sequence71.xaml (9.4 KB)
SplitDataTableDt.xlsx (9.2 KB)

Let me know if you have any queries
Hope it helps!!