public void Close() { // ensure that any lingering writer is closed foreach (SXSSFSheet sheet in _xFromSxHash.Values) { try { sheet._writer.Close(); } catch (IOException e) { logger.Log(POILogger.WARN, "An exception occurred while closing sheet data writer for sheet " + sheet.SheetName + ".", e); } } // Tell the base workbook to close, does nothing if // it's a newly created one XssfWorkbook.Close(); }