Hi Guys!!
Here I have to get all the row items between the Header row & Total row. The number of row items between these two rows will change everytime. How can I get it?
Please help me to fix this
@Palaniyappan @Anil_G
Thanks in Advance
Hi Guys!!
Here I have to get all the row items between the Header row & Total row. The number of row items between these two rows will change everytime. How can I get it?
Please help me to fix this
@Palaniyappan @Anil_G
Thanks in Advance
Hi @mohamedalthaf,
I suggest the following solution:
Hope this helps.
Kind regards,
Kenneth
Hi,
Which data type as a result do you need?
If DataRow array, the following will work.
arrDataRow = dt.AsEnumerable.Take(dt.Rows.Count-1).ToArray()
Dt is DataTable from worksheet. (Add Headers option is enabled.)
If DataTable, the following will work.
newDr = dt.AsEnumerable.Take(dt.Rows.Count-1).CopyToDataTable()
Regards,
Cheers
Thank You @kennbalobalo . This is working
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.