Is there any way to cut all rows to the bottom of excel?

I’d like to cut off all the bottom rows from the input data.
The reason for this is that there are Excel functions below it, and I want to get rid of all the unnecessary rows.

Of course, there is a way to pick up only the input data and paste it into another Excel, but the destination is specified and it should not be the Excel that has the function, so deleting all the unnecessary function lines is a challenge.

Is there any way to remove all the lines below a particular line of input?


We can skip or take the records we want with this method

Dt = Dt.Asenumerable().Take(number of rows in count you want).CopyToDataTable()

If you want to remove last row alone then

Dt = Dt.Asenumerable().Take(dt.rows.count - 1).CopyToDataTable()


If you know the range of data to be extracted dt from a excel then we can mention the range as well while reading the excel with READ RANGE activity

Hope this would help you resolve this


Thank you very much.

I’m not good at writing code.
Your advice was very helpful in solving the above problem.

1 Like

No worries

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