try {
sheet.getSheetDataWriter().close();
} catch (IOException e) {
- // ignore exception here
+ logger.log(POILogger.WARN,
+ "An exception occurred while closing sheet data writer for sheet "
+ + sheet.getSheetName() + ".", e);
}
}
@Override
public void write(OutputStream stream) throws IOException
{
- for (SXSSFSheet sheet : _xFromSxHash.values())
- {
- sheet.flushRows();
- }
-
+ flushSheets();
+
//Save the template
File tmplFile = TempFile.createTempFile("poi-sxssf-template", ".xlsx");
try
}
}
+ protected void flushSheets() throws IOException {
+ for (SXSSFSheet sheet : _xFromSxHash.values())
+ {
+ sheet.flushRows();
+ }
+ }
+
/**
* Dispose of temporary files backing this workbook on disk.
* Calling this method will render the workbook unusable.