title: Can't read Excel 2010 file with Apache POI. First Row number is -1
body: <p>I am trying the this <a href="https://dl.dropboxusercontent.com/u/33313421/stackoverflow/testfile.xlsx" rel="nofollow">testfile</a> with the Apache POI API (current version 3-10-FINAL). The following test code </p>
  
  <pre><code>import java.io.FileInputStream;
  import org.apache.poi.xssf.usermodel.XSSFSheet;
  import org.apache.poi.xssf.usermodel.XSSFWorkbook;
  
  public class ExcelTest {
  
      public static void main(String[] args) throws Exception {
          String filename = "testfile.xlsx";
          XSSFWorkbook wb = new XSSFWorkbook(new FileInputStream(filename));
          XSSFSheet sheet = wb.getSheetAt(0);
          System.out.println(sheet.getFirstRowNum());
      }
  }
  </code></pre>
  
  <p>results in the first row number to be -1 (and existing rows come back as null). The test file was created by Excel 2010 (I have no control over that part) and can be read with Excel without warnings or problems. If I open and save the file with my version of Excel (2013) it can be read perfectly as expected.</p>
  
  <p>Any hints into why I can't read the original file or how I can is highly appreciated.</p>