Copying Substring of a column to another column?

@Michael_de_Borja

Use Read Range for the existing excel.

Add DataColumn with Column Name as ID

then use the below query

DataTableVariable2 = (From x In DataTableVariable1.AsEnumerable()
Select DataTableVariable1.Clone.Rows.Add({x(“Account”),convert.ToString(x(“Account”)).split("-"c)(1).Substring(0,3)})).copytodatatable

you can use DataTableVariable2 as u require

3 Likes