Query to get all rows below particular row-index of datatable

hello i want query to fetch all the rows of data table below a particular row index, lets say below 10th row. Help me with the select query

Hey @Priyanka_Sharma1
Suppose you’re using read range in that you can specific A10 in the cell range and you will get your desired output.

@Priyanka_Sharma1,

You can get all the rows and remove the rows till the index. Then you can use with remaining rows.

is there a one line query to remove those rows, without for each loop?

@Priyanka_Sharma1,

Try to use this if you know the index and skip count as well

yourDataTable.Rows.Cast(Of System.Data.DataRow)().Skip(50).Take(50).CopyToDataTable 

thank you. works for me

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.