码迷,mamicode.com
首页 > 其他好文 > 详细

SXSSFWorkbook用于海量数据Excel导出类

时间:2015-02-04 11:14:13      阅读:233      评论:0      收藏:0      [点我收藏+]

标签:

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

SXSSFWorkbook用于海量数据Excel导出类

标签:

原文地址:http://my.oschina.net/laigous/blog/375077

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!