title: OpenXML does not help to read large Excel files contrary to documentation
body: <p>The <a href="https://msdn.microsoft.com/en-us/library/office/gg575571.aspx" rel="nofollow noreferrer">documentation</a> says that:</p>
  
  <pre><code>The following code segment is used to read a very large Excel 
  file using the DOM approach.
  </code></pre>
  
  <p>and then goes an example. I use it to implement reading a relatively large file with 700K rows. I have this code by now:</p>
  
  <pre><code>using (SpreadsheetDocument spreadsheetDocument = SpreadsheetDocument.Open(path, false)) 
  {
      WorkbookPart workbookPart = spreadsheetDocument.WorkbookPart;
      WorksheetPart worksheetPart = workbookPart.WorksheetParts.First();
      SheetData sheetData = worksheetPart.Worksheet.Elements&lt;SheetData&gt;().First();
      // no other code
  }
  </code></pre>
  
  <p>When I start my program, I see how quickly - just in five seconds - it runs out of memory (>1G). And the debugger points to this line of code:</p>
  
  <pre><code>SheetData sheetData = worksheetPart.Worksheet.Elements&lt;SheetData&gt;().First();
  </code></pre>
  
  <p>So, I need to know whether <code>OpenXML</code> really helps to read large files. And, if not, what are the alternatives (Interop does not help - I've already checked it).</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>One extra mysterious thing. This code I get by now:</p>
  
  <pre><code>OpenXmlReader reader = OpenXmlReader.Create(worksheetPart);
  while (reader.Read())
  {
      if (reader.ElementType == typeof(Row))
      {
          count++;
      }                                
  }
  </code></pre>
  
  <p>gives me in the <code>count</code> variable over than a million of rows. However, I do have 14K on the first sheet and 700K on the second sheet. It is very strange. So, my extra question is how to parse only rows with data using <code>SAX</code> approach. And one final mystery of reading large Excel files on OpenXML. One guy in this <a href="https://stackoverflow.com/questions/10555507/using-openxmlreader">thread</a> says that: "Turns out that the worksheets are enumerated backwards for some reason (so  the first of my three sheets is actually index 3". So, my final extra question is how to get the sheet you want. At this moment I use this code:</p>
  
  <pre><code>WorkbookPart workbookPart = spreadsheetDocument.WorkbookPart;
  WorksheetPart worksheetPart =     workbookPart.WorksheetParts.First();
  </code></pre>
  
  <p>But taking into account what the say, I'm not sure that in my case I would actually get the first worksheet. </p>