How to Select the Datatable Rows as per the Range of Row Index?

Hello Team,
I am Working On an Reporting Related automation Process, Where i am dealing with the Large Datatable.
Currently We are facing a Problem Due to Larger File Size where the Size is Exceeds 25MB We are not able to Send the File in Attachment to the Particular Stake holder.

To Resolve this Issue I have Decided to Divide the Excel file As per the Numbers of Rows.
So If the Size of the Excel File will Exceeds 25MB, In that case I will Store Some of the Rows in Other File and Remove the Same From Main File and Send it to Stake Holders.

I wanted to Access the Datarows as per the index. For Example if My Source Datatable has 100000 Rows, then I want to Divide this in Two Files.
1st File should have 1 to 50000 Records and the Second Should have remaining One.
Can Someone please help me out to Achieve this?

I can iterate the Datatable but Due to Large Numbers of Rows It will take Quite Long time so would not Prefer to use them.

Any Help is Very Appreciated.

Thanks in Advanced.
Kind Regards,
Nirmal Kachhia

We can split by using skip / take methods have look below for some starter help

Thanks @ppr , I have Tried the Solution that you have provided and it worked Smoothly. also Deployed the Process on Production and the Result Looks Great.

Thanks Once Again for providing the solution

Regards,
Nirmal

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