title: Permanently Delete Empty Rows Apache POI using JAVA in Excel Sheet
body: <p>I'd like to permanently delete those rows that are empty have no data of any type! I am doing this like:</p>
  
  <pre><code> private void shift(File f){
      File F=f;
      HSSFWorkbook wb = null;
      HSSFSheet sheet=null;
      try{
      FileInputStream is=new FileInputStream(F);
  
      wb= new HSSFWorkbook(is);
      sheet = wb.getSheetAt(0);
      int rowIndex = 0;
      int lastRowNum = sheet.getLastRowNum();
  
     if (rowIndex &gt;= 0 &amp;&amp; rowIndex &lt; lastRowNum) {
     sheet.shiftRows(rowIndex, lastRowNum, 500);
     }
  
          FileOutputStream fileOut = new FileOutputStream("C:/juni.xls");
           wb.write(fileOut);
           fileOut.close();
      }
      catch(Exception e){
          System.out.print("SERRO "+e);
      }
  
  }
  </code></pre>
  
  <p>after shiftRows() i write my new file. But my code has now effect. I just need to remove/delete the empty rows that come inside my data (any ever). so is it possible doing so? if yes, am i doing right? if no can anybody please help me doing so? Thanks in advance! </p>