SXSSFWorkbook用于海量数据Excel导出类

public SXSSFWorkbook(XSSFWorkbook workbook)
/*
Construct a workbook from a template.
下列三种模式可以用此构造方法
There are three use-cases to use SXSSFWorkbook(XSSFWorkbook) :
追加sheet到已有XSSFWorkbook工作区后
Append new sheets to existing workbooks. You can open existing workbook from a file or create on the fly with XSSF.
追加row到已有的sheet,追加的row必须大于已有sheet的最大row后
Append rows to existing sheets. The row number MUST be greater than max(rownum) in the template sheet.
获得已有sheet元素
Use existing workbook as a template and re-use global objects such as cell styles, formats, images, etc.
三种可以混合
All three use cases can work in a combination.
不支持的
What is not supported:
通过初始化cells和rows,通过些构造方法,使用getRow和getCell方法将返回
Access initial cells and rows in the template. After constructing SXSSFWorkbook(XSSFWorkbook) all internal windows are empty and SXSSFSheet@getRow and SXSSFRow#getCell return null.
覆盖已存在的cells和rows将导致文件不可读
Override existing cells and rows. The API silently allows that but the output file is invalid and Excel cannot read it.
Parameters:
workbook - the template workbook
*/

http://poi.apache.org/apidocs/org/apache/poi/xssf/streaming/SXSSFWorkbook.html


使用方法看另一博文

转载于:https://my.oschina.net/laigous/blog/375077

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值