Consider der are n rows. I need to divide the datatable for each 999 rows.

Example :

If the Excel sheets contains

1)1000 rows then two data tables need to be created one with 999 rows and the other with 1 row.

2)If the Excel contains less than 999 rows then the Single datatable is enough.

Please help me with this. Note : The EXcel Sheet contains the large amount of data