title: remove() function not removing any rows in excel
body: <p>I am trying to delete all rows in an excel using the below code:</p>
  
  <pre><code>InputStream oFile=new FileInputStream(DefectExcel);
  Workbook oWB= WorkbookFactory.create(oFile);     
  Sheet sheet= oWB.getSheet(Sheet1);
  Row oRow= sheet.getRow(i);
  
  for (int i =0;i &lt;=sheet.getLastRowNum(); i++) {
      sheet.removeRow(sheet.getRow(i));
      System.out.println("Row Deleted");
  }
  </code></pre>
  
  <p>Also tried using the below code as well:</p>
  
  <pre><code>InputStream oFile=new FileInputStream(DefectExcel);
  Workbook oWB= WorkbookFactory.create(oFile);     
  Sheet sheet= oWB.getSheet(Sheet1);
  Row oRow= sheet.getRow(i);
  Iterator&lt;Row&gt; rowIte =  sheet.iterator();
  while(rowIte.hasNext()){
      System.out.println("Row deleted");
      rowIte.next();              
      rowIte.remove();
  </code></pre>
  
  <p>In both the above code, its printing Row deleted number of times the available row but the row originally is still not deleted from the excel.</p>
  
  <p>Can someone please help why the rows are still not deleted from the excel and how can I remove all the rows in the excel?</p>