POI 读大文件日志

 

 

POI的三个目录

usermodel 包含很多类,方便用户使用,但是占用内存大

eventusermodel 使用xml的SAX事件解析,XSSFReader创建时必须使用OPCPackage,pkg这个对象是通过OPCPackage.open(File或者inputStream)创建出来的, 这个过程是将excel文件解析成了xml文档(?),对于一个50M的excel占用内存达到500M左右。

后面解析这个xml时才用到SAX事件,

streaming如何用??

 

 

阿里开源工具

https://github.com/alibaba/easyexcel/blob/master/quickstart.md

 

 

内存占用测试工具:https://github.com/vipshop/vjtools/tree/master/vjmap

 

参考 : 

http://poi.apache.org/components/spreadsheet/how-to.html#xssf_sax_api 单个cell一个一个读,类型转换比较麻烦

https://svn.apache.org/repos/asf/poi/trunk/src/examples/src/org/apache/poi/xssf/eventusermodel/XLSX2CSV.java SheetContentsHandler 可以按行读取

http://www.360doc.com/content/12/0313/15/8101845_194017672.shtml

https://www.cnblogs.com/swordfall/p/8298386.html

easypoi.jar 行数据解析成对象时关系错乱

 

转载于:https://www.cnblogs.com/yszzu/p/9648579.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值