title: C# ExcelPackage (EPPlus) DeleteRow does not change sheet dimension?
body: <p>I am trying to build a data import tool that accepts an EXCEL file from the user  and parses the data from the file to import data into my application.</p>
  
  <p>I am running across a strange issue with DeleteRow that I cannot seem to find any information online, although it seems like someone would have come across this issue before. If this is a duplicate question, I apologize, however I could not find anything related to my issue after searching the web, except for <a href="https://stackoverflow.com/questions/34089677/how-can-i-get-actual-used-range-for-modified-excels-using-epplus">this one</a> which still isn't solving my problem.</p>
  
  <p>So the issue:</p>
  
  <p>I use the following code to attempt to "remove" any row that has blank data through ExcelPackage.</p>
  
  <pre><code>                for (int rowNum = 1; rowNum &lt;= ws.Dimension.End.Row; rowNum++)
                  {
                      var rowCells = from cell in ws.Cells
                                          where (cell.Start.Row == rowNum)
                                          select cell;
                      if (rowCells.Any(cell =&gt; cell.Value != null))
                      {
                          nonEmptyRowsInFile += 1;
                          continue;
                      }
                      else ws.DeleteRow(rowNum);
                      //Update: ws.DeleteRow(rowNum, 1, true) also does not affect dimension
                  }
  </code></pre>
  
  <p>Stepping through that code, I can see that the DeleteRow is indeed getting called for the proper row numbers, but the issue is when I go to set the "total rows in file" count on the returned result object:</p>
  
  <pre><code>parseResult.RowsFoundInFile = (ws.Dimension.End.Row);
  </code></pre>
  
  <p>ws.Dimension.End.Row will still return the original row count even after the calls to DeleteRow.</p>
  
  <p>My question is...do I have to "save" the worksheet or call something in order for the worksheet to realize that those rows have been removed? What is the point of calling "DeleteRow" if the row still "exists"? Any insight on this would be greatly appreciated...</p>
  
  <p>Thanks</p>