Split excel file with dynamic row count

Hello Everyone
I have a daily excel file to work with (with variable row count ).
I need to split this file into multiple files ( every 1000 line in a file or data table)
How can i do it with a dynamic row count


If you read the data into datatable…

Then you can use the following two function in a loop to get or skip

Dt.AsEnumerable.Take(1000) will get first 1000
Dt.AsEnumerable.Skip(1000) will skip the first 1000 records

Repeat this in loop …end the loop when the count is reached to dt.rowcount


And also: