/**
   * @see
   *     net.sourceforge.squirrel_sql.fw.gui.action.exportData.AbstractDataExportFileWriter#afterWorking()
   */
  @Override
  protected void afterWorking() throws Exception {
    FileOutputStream out = new FileOutputStream(this.file);
    this.workbook.write(out);
    out.close();

    // dispose of temporary files backing this workbook on disk
    if (workbook instanceof SXSSFWorkbook) {
      ((SXSSFWorkbook) workbook).dispose();
    }
  }
示例#2
0
 private void writeToFile(SXSSFWorkbook wb) throws FileNotFoundException, IOException {
   FileOutputStream out = new FileOutputStream(filePath);
   wb.write(out);
   wb.dispose();
   out.close();
 }
示例#3
0
 /** 清理临时文件 */
 public ExportExcel dispose() {
   wb.dispose();
   return this;
 }