title: Excel POI Unexpected missing row when some rows already present
body: <p>Someone have already seen this error ?</p>
  
  <p>I get it just when I create my HSSFWorkbook</p>
  
  <pre><code>    try {
  
          LOGGER.info("Open Excel file: " + filename);
          InputStream inputStream = new FileInputStream(filename);
          Workbook wb = new HSSFWorkbook(inputStream);
  
          Sheet sheet = wb.getSheetAt(0);
  
          /* save excel */
          FileOutputStream fileOut = new FileOutputStream(filenameOutput);
          wb.write(fileOut);
          fileOut.close();
  
          wb.close();
          inputStream.close();
  
      } catch (IOException e1) {
          LOGGER.log(Level.SEVERE, e1.getMessage(), e1);
      }
  </code></pre>
  
  <p>error is on <code>new HSSFWorkbook(inputstream)</code></p>
  
  <pre><code>Exception in thread "main" java.lang.RuntimeException: Unexpected missing row when some rows already present
      at org.apache.poi.hssf.usermodel.HSSFSheet.setPropertiesFromSheet(HSSFSheet.java:212)
      at org.apache.poi.hssf.usermodel.HSSFSheet.&lt;init&gt;(HSSFSheet.java:137)
      at org.apache.poi.hssf.usermodel.HSSFWorkbook.&lt;init&gt;(HSSFWorkbook.java:338)
      at org.apache.poi.hssf.usermodel.HSSFWorkbook.&lt;init&gt;(HSSFWorkbook.java:289)
      at org.apache.poi.hssf.usermodel.HSSFWorkbook.&lt;init&gt;(HSSFWorkbook.java:224)
      at org.apache.poi.hssf.usermodel.HSSFWorkbook.&lt;init&gt;(HSSFWorkbook.java:382)
      at org.apache.poi.hssf.usermodel.HSSFWorkbook.&lt;init&gt;(HSSFWorkbook.java:364)
  </code></pre>
  
  <p>Any idea ?</p>
  
  <p>I have seen this question on <a href="http://apache-poi.1045710.n5.nabble.com/Unexpected-missing-row-when-some-rows-already-present-td5527417.html" rel="nofollow">http://apache-poi.1045710.n5.nabble.com/Unexpected-missing-row-when-some-rows-already-present-td5527417.html</a> but they don't give good answer</p>
  
  <p>I use POI 3.12</p>
  
  <p>UPDATE : My excel contain 53 rows and hundreds columns so he is not empty. The excel was generated with <strong>Buisness Object</strong> and <a href="https://bz.apache.org/bugzilla/show_bug.cgi?id=47245" rel="nofollow">some people have the very same issues</a> with no solution.</p>
  
  <p>Source code of HSSFSheet is <a href="http://grepcode.com/file/repo1.maven.org/maven2/org.apache.poi/poi/3.12/org/apache/poi/hssf/usermodel/HSSFSheet.java" rel="nofollow">here</a> </p>