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 [email protected] 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
时间: 2024-10-03 19:03:21