Select 500000 records and write to excel sheet till all records are processed

Hi,

I assume you have 3 million rows in a datatable in that case we can use linq to split the datatable into multiple chunks. Please refer the below thread and suggestions. It might helpful for your requirement. Thanks.