title: Apache POI XSSF reading in excel files
body: <p>I just have a quick question about how to read in an xlsx file using the XSSF format from Apache. </p>
  
  <p>Right now my code looks like this:</p>
  
  <pre><code>InputStream fs = new FileInputStream(filename);   // (1)
  XSSFWorkbook wb = new XSSFWorkbook(fs);           // (2)
  XSSFSheet sheet = wb.getSheetAt(0);               // (3)
  </code></pre>
  
  <p>...with all the relevant things imported. My problem is that when I hit run, it gets stuck at line (2), in almost an infinite loop. <code>filename</code> is just a string.</p>
  
  <p>If anybody could give me some sample code on how to fix this I would really appreciate it. All i want right now is to read in a single cell from an xlsx file; I was using HSSF for xls files and had no problems.</p>
  
  <p>Thanks for your help,
  Andrew</p>