Reading large XLSX files
<p>I have an application that have to read excel and convert it to array. So far so good. Everything works file until I try to convert a larger file. I try OpenXML and try SAX approach:</p>

<pre><code>using (SpreadsheetDocument xlsx = SpreadsheetDocument.Open(filePath, false))
{
   WorkbookPart workbookPart = xlsx.WorkbookPart;
   List&lt;List&lt;string&gt;&gt; parsedContent = new List&lt;List&lt;string&gt;&gt;();
   foreach (WorksheetPart worksheet in workbookPart.WorksheetParts)
       {
           OpenXmlReader xlsxReader = OpenXmlReader.Create(worksheet);

           while (xlsxReader.Read())
           {
           }
        }
 }
</code></pre>

<p>This is working well for files in range 1 - 10MB. My problem is when I try to load 10+ MB file. The result is OutOfMemoryException. How to proper read that big chunk of data? How to do it memory efficient? </p>

<p>P.s. I try libraries like ClosedXML, EPPlus and few others. </p>

<p>Every solution will be appreciated. Thank you in advance</p>