how to export 5,00,000 records into excel [xls] format

Posted by Prabu_Spark under ASP.NET on 6/18/2013 | Points: 10 | Views : 1342 | Status : [Member] | Replies : 3
Hi sir,
Tell me the steps to export 5,00,000 records into excel [xls excel 2003 format]. I can able to export 65,536 rows.


If i export 5,00,000 records, i am getting System out of memory exception, Kindly give me the solution for this problem.

With regards,
J.Prabu.
[Email:prbspark@gmail.com]



Responses

Posted by: Allemahesh on: 6/18/2013 [Member] [MVP] Silver | Points: 25

Up
0
Down
I think you can not export 5,00,000 records into excel sheet. But I am not sure. But you can use the different sheets for different records.
E.g.:
Sheet 1 -> 50,000 records.
Sheet 2 -> 50,000 records.
Sheet 3 -> 50,000 records.
and so on....

Hope this will help you. Happy coding.

Prabu_Spark, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Bageshkumarbagi on: 6/19/2013 [Member] Starter | Points: 25

Up
0
Down
Hi,

Once you export 500000 record in xls formate it will aAutomatically data will be copy in other sheet like
Sheet1-65536
sheet2-65536 and so on....
up to last records

Best option you use Xlsx (Excel 2010).

Thanks,
Bagesh Kumar Singh

Thanks,
Bagesh Kumar Singh
Mark as answer if you have been satisfied

Prabu_Spark, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Harilakshmi on: 6/19/2013 [Member] Starter | Points: 25

Up
0
Down
Hi,

You can't because xls is restricted to 65536 rows in total. You would need to devide it into different sheets or use xlsx instead.

Thanks & Regards,
HariLakshmi.

Prabu_Spark, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response