DocumentInputStream documentInputStream = root.createDocumentInputStream(WORKBOOK_ENTRY);
HSSFEventFactory eventFactory = new HSSFEventFactory();
try {
eventFactory.processEvents(hssfRequest, documentInputStream);
} catch (org.apache.poi.EncryptedDocumentException e) {
throw new EncryptedDocumentException(e);
}
// Output any extra text that came after all the sheets
processExtraText();