Apache POI XSSF 的堆空间错误 [英] Heap space error with Apache POI XSSF
本文介绍了Apache POI XSSF 的堆空间错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用 Apache POI XSSF 库解析大型 excel 文件 (.xlsx).在 100,000 行之后,它会引发堆空间错误.我尝试增加内存,但没有帮助.这个问题有解决方法吗?或者有人可以建议我使用另一个库来解析大型 excel 文件.
I am trying to parse a large excel file(.xlsx) using Apache POI XSSF library. After 100,000 rows it throws heap space error. I tried increasing the memory but it does not help. Is there a workaround for this problem? Or can someone suggest me a another library to parse large excel files.
谢谢!
推荐答案
您可以使用 http://poi.apache.org/spreadsheet/how-to.html#xssf_sax_api
查看此线程以了解详细信息.
Have a look at this thread for details.
高效使用Apache-POI从excel文件中搜索记录的方法
这篇关于Apache POI XSSF 的堆空间错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文