Out of Memory Exception SaveExcel and SaveExcelToResponse

Posted by: lynne_kraus on 10 December 2018, 3:11 am EST

    • Post Options:
    • Link

    Posted 10 December 2018, 3:11 am EST

    Has there been a resolution to the Out of Memory exception when using Spread .NET?I’ve tried using my licensed version (Spread.NET 6) as well as the latest trial version Spread.NET 12. I’m using ExcelSaveFlags.UseOOXMLFormat | FarPoint.Excel.ExcelSaveFlags.SaveBothCustomRowAndColumnHeaders and have tried the DataOnly option, too. In all cases, I can export about 82K rows which takes approx. 2 minutes to download. When I change the report criteria to 126K or more, it crashes after about 5 minutes with an Out of Memory exception. Any suggestions would be appreciated. Are there other products for exporting to excel from a web page?

  • Posted 10 December 2018, 10:03 pm EST

    Hello,

    There could be many causes for OutOfMemory Exception:-

    1. Due to system’s limitation (memory)
    2. The amount of RAM that is installed impact the possibility of an OutOfMemoryException
    3. The common language runtime cannot allocate enough contiguous memory to successfully perform an operation. This exception can be thrown by any property assignment or method call that requires a memory allocation.
    4. Your process is using a lot of memory.
    5. The virtual address space is fragmented, reducing the likelihood that a large, contiguous allocation will succeed.

    However, it could be related to data in Spread as well i.e. what type of data is there in Spread control. Are there any images in Spread cell which you are trying to export?

    Could you please share a small sample replicating the issue so that we can investigate this issue further. You can use dummy data to showcase your issue.

    Please share a small stripped out sample replicating the issue. We will look into the same thereon and also share your machine’s configuration and architecture to replicate the issue here at our end.

    Thanks,

    Reeva

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels