diff --git a/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFWorkbook.java b/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFWorkbook.java index a9cdd954ec..a79f1aad02 100644 --- a/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFWorkbook.java +++ b/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFWorkbook.java @@ -77,7 +77,42 @@ public class SXSSFWorkbook implements Workbook public SXSSFWorkbook(){ this(null /*workbook*/); } - + + /** + * Construct a workbook from a template. + *

+ * There are three use-cases to use SXSSFWorkbook(XSSFWorkbook) : + *

    + *
  1. + * Append new sheets to existing workbooks. You can open existing + * workbook from a file or create on the fly with XSSF. + *
  2. + *
  3. + * Append rows to existing sheets. The row number MUST be greater + * than max(rownum) in the template sheet. + *
  4. + *
  5. + * Use existing workbook as a template and re-use global objects such + * as cell styles, formats, images, etc. + *
  6. + *
+ * All three use cases can work in a combination. + *

+ * What is not supported: + * + * + * @param workbook the template workbook + */ public SXSSFWorkbook(XSSFWorkbook workbook){ this(workbook, DEFAULT_WINDOW_SIZE); }