Hi Everyone.
I have datatable as attached excel file.
I want to add sequence number into rows as attached picture.
How to do that without loop row in datatable?? Such as Linq
Thanks in advance!
Book1.xlsx (8.3 KB)

Hi Everyone.
I have datatable as attached excel file.
I want to add sequence number into rows as attached picture.
How to do that without loop row in datatable?? Such as Linq
Thanks in advance!
Book1.xlsx (8.3 KB)

Hi,
Do you want to flll it at blank Number column? If so, the following helps you.

dt.AsEnumerable.Select(Function(r,i) dt.Clone.LoadDataRow({r("item"),Math.Floor(i/2)+1,r("Quantity")},False)).CopyToDataTable
Sample20210611-3.zip (9.8 KB)
Regards,
Thanks you very much!
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.