We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Outof Memory Exception while loading excel file

Dear Aspose Team,

I am getting out-of-memory exception while loading the excel file. Please find the attached document for reproduce.

I am using the following code to load the excel file.

var workbook = new Workbook(fileLocation);

Thanks & Regards,
N.Murali Krishna.

Hi Murali,

Thank you for contacting Aspose support.

As you are loading a huge data set, it is advised to use the Memory Preferences option offered by the Aspose.Cells APIs to avoid OutOfMemoryException. Please check the following piece of code that loads your provided spreadsheet without throwing any exception. Moreover, we have tested this scenario while using the latest version of Aspose.Cells for .NET 8.5.1 therefore if you are using any previous release, please give a try to the latest one.


var myWorkBook = new Workbook(“D:/testdata.xlsx”, new LoadOptions(){MemorySetting = MemorySetting.MemoryPreference});

Hi Babar,

Thanks for your reply, and it solved the out-of-memory exception problem. Thanks a lot.

Please mention this point in the programmers guide some where.

Thanks & Regards,
N.Murali Krishna.

Hi Murali,

Thank you for the confirmation. We have already announced the support for large spreadsheet with Aspose.Cells API over the Aspose blog, however, we will add this information to FAQ section as well.

Please feel free to get in touch if you need our further assistance with Aspose APIs.