Out of memory Error When reading a large excel file using apache POI. Any other alternative

huangapple go评论77阅读模式
英文:

Out of memory Error When reading a large excel file using apache POI. Any other alternative

问题

我想使用Apache POI读取一个非常大的Excel文件。
但是它报出了堆内存溢出错误。我没有办法增加堆内存大小。是否有其他解决方案呢?

英文:

I want to read a very large excel file using Apache POI.
But it is throwing a heap size out of memory error. There is no chance I can increase the heap size.Are there any other solutions for this.

答案1

得分: 2

根据您的具体需求,POI流式API 可能是解决方案。它避免了一次性将整个文件加载到内存中,但在功能上有一定的限制。

这个问题的答案可能会有帮助,其中一个答案建议使用一个使得与流式API一起工作更加容易的库

英文:

Depending on exactly what you are trying to do, POI's streaming API might be the solution. It avoids loading the whole file into memory at the same time but is limited in its functionality.

The answers to this question might be useful as one of them suggests a library that makes working with the streaming API easier.

huangapple
  • 本文由 发表于 2020年7月26日 11:49:36
  • 转载请务必保留本文链接:https://go.coder-hub.com/63095895.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定