Context
I used EPPLUS as my Excel report automation tool, using C # as the library client language.
Problem:
After you try to write a really big report (SQL Query answer), with pivot tables, charts, etc., I get an Out of Memory Exception .
Problem solving
To fix the problems, I decided to open an existing report with 138 MB and use the GC object to try to look at what is happening with my memory, and here are the results.
ExcelPackage pkg = new ExcelPackage (new FileInfo (@"PATH TO THE REPORT.xlsx")); ExcelWorkbook wb = pkg.Workbook;
Garbage collection results before and after the second line of code.

So, I have no idea what to do from now on. All I do is open a report that consumes almost 10 (9.98%) times the size of the report from memory.
~ 138 MB of the excel file takes 1,370.817.264 bytes of RAM.
Update one:
There is a fairly recent one that has a change log on it:
New Cell store * Less memory consumtion * Insert columns (not on the range level) * Faster row inserts
After updating Nuget, I still have the same exception that is thrown after the first line, instead of being raised in the second line.
source share