0
votes

Exporting Large Amount Of Data Using Jxls-core 1.0.2 Hi all, I'm having issues with exporting (to excel) big bean with more than 40 thousand items using Jxls core 1.0.2 Sometimes I get Java out of memory error. Is there a way to Implement it in chunch (write in chuncks)? It works fine with less than 5 000

Map<String, Object> beans = new HashMap<String, Object>();
    beans.put("users", users);
    XLSTransformer transformer = new XLSTransformer();
    Workbook workbook;
    try {
        workbook = transformer.transformXLS(new FileInputStream(filePath),
                beans);
        System.out.println(workbook);
        workbook.write(responseOutputStream);
1

1 Answers

1
votes

I would recommend you to upgrade to jxls-2, you can easily use a SxssfTransformer which will handle all your requirements.

See here: https://bitbucket.org/leonate/jxls-demo (specifically, the org.jxls.demo.SxssfDemo class).