title: Java POI the supplied data appears to be in the Office 2007+ XML
body: <p>I am getting this error:</p>
  
  <blockquote>
    <p>org.apache.poi.poifs.filesystem.OfficeXmlFileException: The supplied data appears to be in the Office 2007+ XML. You are calling the part of POI that deals with OLE2 Office Documents. You need to call a different part of POI to process this data (e.g. XSSF instead of HSSF)</p>
  </blockquote>
  
  <p>I read throw Google and I found out that I need to use XSSF instead of HSSF because my Excel file is xlsx, but as you see in my maven, I am already using xlsx. Where have I gone wrong please?</p>
  
  <pre><code>&lt;dependency&gt;
          &lt;groupId&gt;org.apache.poi&lt;/groupId&gt;
          &lt;artifactId&gt;poi-ooxml&lt;/artifactId&gt;
          &lt;version&gt;3.13-beta1&lt;/version&gt;
      &lt;/dependency&gt; 
  </code></pre>
  
  <p>The code the makes the exception is:</p>
  
  <pre><code>POIFSFileSystem fs;
  
              fs = new POIFSFileSystem(new FileInputStream(getFilePath()));
  </code></pre>
  
  <h3>My new code</h3>
  
  <pre><code>public void getBColum() {
      try {
          OPCPackage fs;
  
          fs = new OPCPackage.open(new File(getFilePath()));
  
          XSSFWorkbook wb = new XSSFWorkbook(fs);
          XSSFSheet sheet = wb.getSheet("Master column name - Used Car");
          XSSFRow row;
          CellReference cr = new CellReference("A1");
          row = sheet.getRow(cr.getCol());
          System.out.println(row.getCell(3));
      } catch (FileNotFoundException e) {
          if (logger.isDebugEnabled()) {
              logger.debug("How can this error be possible? we should have already thrown an exception in the construction");
          }
      } catch (IOException e) {
          logger.error(String.format("Exception in reading the file: %s",
                  e.getMessage()));
      }
  }
  </code></pre>
  
  <p>I have a compile error in <code>new oPCPackage.open</code> which is:</p>
  
  <blockquote>
    <p>OPCPackage.open cannot be resolved to a type</p>
  </blockquote>