FileInputStream fin = new FileInputStream(file);
POIFSFileSystem poifs = new POIFSFileSystem(fin);
InputStream din = poifs.createDocumentInputStream("Workbook");
HSSFRequest req = new HSSFRequest();
req.addListenerForAllRecords(new HSSFListener()
{
public void processRecord(Record rec)
{
System.out.println(rec.toString());
}
});
HSSFEventFactory factory = new HSSFEventFactory();
factory.processEvents(req, din);