This is a migrated thread and some comments may be shown as answers.

Out of memory exception when exporting to excel from radgrid

4 Answers 171 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Kavita
Top achievements
Rank 1
Kavita asked on 24 Oct 2013, 12:53 PM
I get this error System.OutOfMemoryException when i export radgrid data to excel even if record count to 6000 only.
Please provide me some solution.

4 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 25 Oct 2013, 05:45 AM
Hi Kavitha,

You get this error because you try to export large records at once.
Unfortunately there is little that can be done when trying to export large amounts of data.I can suggest you either to consider decreasing the amount of data or export only the current page by setting the IgnorePaging option to 'false'.
RadGrid can support much larger DataSets than 60K. The problem is related to the excel. Excel 2003 supports up to 65,536 records whereas Excel 2007 can handle up to 1,048,576 rows. So, you can probably upgrade to Excel 2007 or higher.

Thanks,
Princy
0
Kavita
Top achievements
Rank 1
answered on 31 Oct 2013, 08:40 AM
Hey princy,
Thanks for your reply.
But the problem is i m using excel 2007 only as well as my data is also not that large.
It count around six thousand only.
Still i m getting this out of memory error .

0
Kostadin
Telerik team
answered on 04 Nov 2013, 02:31 PM
Hi Kavita,

Note that the same among memory is needed to display the grid in the browser. If you remove the paging and run the grid the same exception will be thrown. The only way to overcome this issue is either to reduce the number of rows/columns or to export only one page by setting IgnorePaging to false.

Regards,
Kostadin
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Gabriel
Top achievements
Rank 1
answered on 06 Feb 2020, 02:12 PM

Hi. Bit late to the party, but, since I ran into the same problem recently, I experimented a bit, and found that exporting asynchronously, while not supporting visual customization elements, support larger chunks of data (had the error while exporting synchronously, didn't have it when exporting async).

 

Hope this helps!

Tags
General Discussions
Asked by
Kavita
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Kavita
Top achievements
Rank 1
Kostadin
Telerik team
Gabriel
Top achievements
Rank 1
Share this question
or