Unfortunately, this is apparently the main limitation of EPPlus - you can find others who posted about this on their Codeplex page. I faced a similar problem when exporting a large dataset - single tables with 115+ columns wide and 60K + rows. Usually about 30-35 thousand. Lines - this is when he runs out of memory. What happens is each cell created is its own object, which is suitable for a small data set, but in my case it will be 115x60K = ~ 7 million. Since each cell is an object with content (mostly rows), its memory capacity is added up quickly.
At some point in the future, I planned to create XML files manually using Linq2Xml. Xlsx is just a zip file renamed to XML files that make up the contents of the workbook and worksheets. This way you can create an empty xlsx using EPP, save it, open it as zip, pull out sheet1.xml and add the contents of the data using string manipulations. You will also have to work with the sharedstring.xml file that Excel uses to reduce the file size. Perhaps there are other xml files that need updating, as well as with keys or a name.
If you rename any xlxs to a .zip extension, you can see it.
Example sheet1.xml:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac"> <dimension ref="A1:C2"/> <sheetViews> <sheetView tabSelected="1" workbookViewId="0"> <selection activeCell="C5" sqref="C5"/> </sheetView> </sheetViews> <sheetFormatPr defaultRowHeight="15" x14ac:dyDescent="0.25"/> <sheetData> <row r="1" spans="1:3" x14ac:dyDescent="0.25"> <cr="A1" t="s"> <v>0</v> </c><cr="B1" t="s"> <v>1</v> </c><cr="C1" t="s"> <v>0</v> </c> </row> <row r="2" spans="1:3" x14ac:dyDescent="0.25"> <cr="A2" t="s"> <v>1</v> </c><cr="B2" t="s"> <v>0</v> </c><cr="C2" t="s"> <v>1</v> </c> </row> </sheetData> <pageMargins left="0.7" right="0.7" top="0.75" bottom="0.75" header="0.3" footer="0.3"/> </worksheet>
Example sharedstrings.xml:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <sst xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" count="6" uniqueCount="2"> <si> <t>AA</t> </si> <si> <t>BB</t> </si> </sst>
You can see how I manipulated xml in another post:
Create Pivot Table Filters with EPPLUS
Sorry, I could not give you a better answer, but I hope this helps.
Ernie source share