Remove first row using linq query

Have a datatable, remove the first row using linq query
Input
image

Need output
image
Thanks Advance.

@Ranga_prasad,

Use below code in Assign activity:

dataTable = dataTable.AsEnumerable().Skip(1).CopyToDataTable()

Thanks,
Ashok :slight_smile:

Hi Ashok
already used that linq, after using it will skipping the “First Name” row.
is there any linq query to fetch the below rows based on “First Name”
Thanks,
Ranga.

@Ranga_prasad,

What’s your Datatable columns? is it Worker Title?

If it is then Uncheck Add Headers. This will not write the headers/columns.

Thanks,
Ashok :slight_smile:

Hi @Ranga_prasad

Rather than unchecking Add Headers in the Properties Panel of Read Range Workbook you can use the below syntax to remove Worker Title

dtData = dtData.AsEnumerable.Skip(0).CopyToDataTable()

Thie above syntax will remove the Worker Title row.

Regards

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