This project has moved. For the latest updates, please go here.

Writing Large Files

Feb 8, 2012 at 12:45 PM
Edited Feb 8, 2012 at 12:46 PM

Hey,

First off, to the creator of EPPlus, you have made a fantastic tool here. Thanks so much.

I'm creating some very large files and getting your typical OutOfMemoryExceptions.

As per instructed in previous posts I've monitored the memory usage of my app with task manager. The app throws an exception at around the 1.5GB mark. My machine has 16GB DDR3 (which barely ever manages 30% usgae) so I don't think I'm dealing with a hard memory cap.

I think I am hitting the memory limit for any single object (which in .NET is 2GB). And I'm pretty sure that is happening in the collection of cells EPPlus stores (the collection of ExcelCell objects).

I've checked in my debugger and I'm 90% through writing all the information the sheet. So has anyone got any ideas on how I can hack through this?

Is there a way to flush the ExcellCell collection to disk (destroying the large collection of objects as you go)? Can I write and save one sheet at a time (without prohibitive reloading times or disposing completely at all) ?

 

Thanks for any help

Coordinator
Feb 12, 2012 at 3:23 PM

No, you have probably reached the limit on 32-bit windows (if thats is the OS you run on).

If you have the option to run it on a 64-bit Windows it should solve your problem.

Jan

Feb 13, 2012 at 12:57 PM

Thanks for the reply,

I was on a 64bit system but I was building my app as 32bit.

Built as 64bit and it works great!