GC overhead limit exceeded with Apache POI

前端 未结 4 1585
粉色の甜心
粉色の甜心 2020-12-16 17:46

I have 13 .xlsx files with about 1000 rows in each of them. Now I want to merge it to one .xlsx file with one sheet. I\'m using code from here http://blog.sodhanalibrary.com

4条回答
  •  醉梦人生
    2020-12-16 18:18

    Try allocating more memory eg.

    java -Xmx8192m
    

    Also what you can try is to merge in one xlsx file at a time instead of loading them all at once.

    You can also move this line into your for loop:

    excellFile1.close();
    

    So you close it right away.

提交回复
热议问题