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 行数据解析成对象时关系错乱

 

posted @ 2018-09-14 20:07  funny_coding  阅读(592)  评论(0编辑  收藏  举报
build beautiful things, share happiness