Out of memory exception when exporting to excel from radgrid

4 posts, 0 answers
  1. Kavita
    Kavita avatar
    39 posts
    Member since:
    Feb 2013

    Posted 24 Oct 2013 Link to this post

    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.

  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 25 Oct 2013 Link to this post

    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.

  3. Kavita
    Kavita avatar
    39 posts
    Member since:
    Feb 2013

    Posted 31 Oct 2013 Link to this post

    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 .

  4. Kostadin
    Kostadin avatar
    1733 posts

    Posted 04 Nov 2013 Link to this post

    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.

    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.
Back to Top