Skip to content

Commit 6af0006

Browse files
author
GWA
committed
Refactoring: Cleaned up DataExportExcelWriter.afterWorking()
1 parent 39ab3b1 commit 6af0006

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

sql12/core/src/net/sourceforge/squirrel_sql/fw/gui/action/fileexport/DataExportExcelWriter.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -319,14 +319,11 @@ private int calculateRowIdx(ExportCellData cell)
319319
private void afterWorking() throws Exception
320320
{
321321
FileOutputStream out = new FileOutputStream(_fileExportService.getFile());
322-
this._workbook.write(out);
322+
_workbook.write(out);
323+
out.flush();
323324
out.close();
324325

325-
// dispose of temporary files backing this workbook on disk
326-
if (_workbook instanceof SXSSFWorkbook)
327-
{
328-
((SXSSFWorkbook) _workbook).dispose();
329-
}
326+
_workbook.close();
330327
}
331328

332329
}

0 commit comments

Comments
 (0)