How to split excel row

HI,

Hope the following sample helps you.

LINQ case

dt.AsEnumerable.Select(Function(r) dt.Clone.LoadDataRow({r("Employee ID").ToString,System.Text.RegularExpressions.Regex.Match(r("Employee ID").ToString,"\S+$").Value},False)).CopyToDataTable()

ForEachRow case

System.Text.RegularExpressions.Regex.Match(CurrentRow("Employee ID").ToString,"\S+$").Value

Sample20221111-3.zip (10.4 KB)

Regards,

1 Like