gpt4 book ai didi

java - 如何在Java中解析包含多个工作表、内存在50MB以内的xls文件

转载 作者:太空宇宙 更新时间:2023-11-04 11:09:41 25 4
gpt4 key购买 nike

我用过 POI 和 Jexcel。 POI 使用的内存与文件大小一样多,而 Jexcel 在加载工作簿时会占用大量内存。我的需求是分块处理xls文件,以减少内存消耗。

最佳答案

Apache POI 提供类似 SAX 的 API 来访问 Excel 文档。

参见Apache POI Event API :

The event API is newer than the User API. [...] The advantage provided is that you can read an XLS with a relatively small memory footprint.

关于java - 如何在Java中解析包含多个工作表、内存在50MB以内的xls文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46157823/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com