I want to print a serial number starting with 001 that is '001 in excel

Hi @Gopi_Krishna1 ,

To include all columns, you need to modify the LINQ query to include all columns. You can achieve this by selecting all fields in addition to "Column0"

(From row In Final_Dt.AsEnumerable()
Let newValue = "'" & row.Field(Of String)("Column0")
Let otherValues = row.ItemArray.Skip(1).Select(Function(x) "'" & x.ToString()).ToArray()
Select Final_Dt.Clone().Rows.Add({newValue}.Concat(otherValues).ToArray())
).CopyToDataTable()

Regards,
Vinit Mhatre

1 Like