Package org.apache.poi.xssf.streaming

Examples of org.apache.poi.xssf.streaming.SXSSFWorkbook.dispose()


    sheet2.setRowGroupCollapsed(4, true);

    FileOutputStream fileOut = new FileOutputStream("outlining_collapsed.xlsx");
    wb2.write(fileOut);
    fileOut.close();
    wb2.dispose();
  }
}
View Full Code Here


        } catch (IOException e) {
            log.error("Data export error: ", e);
        }

        // Dispose of temporary files backing this workbook on disk
        if (!wb.dispose()) log.warn("Could not dispose of temporary file associated to data export!");

        return bis;
    }

    private Map<String, CellStyle> createStyles(Workbook wb){
View Full Code Here

            Map<String, Object> context = Maps.newHashMap();
            context.put("error", e.getMessage());
            notificationApi.notify(user.getId(), "excelExportError", context);
        } finally {
            // 清除本工作簿备份在磁盘上的临时文件
            wb.dispose();
        }
    }


View Full Code Here

    public synchronized boolean cleanup(){
        boolean ok = true;
        for(int i = 0; i < instances.size(); i++){
            SXSSFWorkbook wb = instances.get(i);
            ok = ok && wb.dispose();
            instances.remove(i);
        }
        return ok;
    }
}
View Full Code Here

        } catch (IOException e) {
            log.error("Data export error: ", e);
        }

        // Dispose of temporary files backing this workbook on disk
        if (!wb.dispose()) log.warn("Could not dispose of temporary file associated to data export!");

        return bis;
    }

    private Map<String, CellStyle> createStyles(Workbook wb){
View Full Code Here

        } catch (IOException e) {
            log.error("Data export error: ", e);
        }

        // Dispose of temporary files backing this workbook on disk
        if (!wb.dispose()) log.warn("Could not dispose of temporary file associated to data export!");

        return bis;
    }

    private Map<String, CellStyle> createStyles(Workbook wb){
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.