title: POI removeRow and shiftRows leaves blank rows at the end of sheet. How to delete them?
body: <p>I am using POI to manipulate an existing excel sheet.<br>
  I want to remove rows in the begining and add rows at the end. When I remove rows I move all rows after them up.</p>
  
  <pre><code>int numOfRows = sheet.getLastRowNum()+1;
  int extraRows = numOfRows - maxAllowedRows;             
  for(int i=1;i&lt;=extraRows;i++){  //i intialized with 1 to ignore header row.
      sheet.removeRow(sheet.getRow(i));
  }
  sheet.shiftRows(extraRows+1,sheet.getLastRowNum(),-extraRows);
  </code></pre>
  
  <p>In current run of the program it works fine. But when the program runs again, as many rows as were removed and shifted in first run equal number of blank rows appear in the sheet at the bottom and any new row that I try to add at the bottom of the sheet gets added after these blank rows.</p>
  
  <p>Is there a way to avoid appearance of blank rows after the remove and shift operation (i.e. <em>Is there any way to actaully delete the rows?</em>)</p>