From 2df37edbaef41852a6dd86addd7771f047702f87 Mon Sep 17 00:00:00 2001 From: Nick Burch Date: Sat, 15 Aug 2015 07:29:27 +0000 Subject: [PATCH] Bigger warnings that new users should use SXSSF, and not mess around with the XML themselves git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1696019 13f79535-47bb-0310-9956-ffa450edef68 --- .../xssf/usermodel/examples/BigGridDemo.java | 25 +++++++++++++------ 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/src/examples/src/org/apache/poi/xssf/usermodel/examples/BigGridDemo.java b/src/examples/src/org/apache/poi/xssf/usermodel/examples/BigGridDemo.java index d9928151a..e2b03711c 100644 --- a/src/examples/src/org/apache/poi/xssf/usermodel/examples/BigGridDemo.java +++ b/src/examples/src/org/apache/poi/xssf/usermodel/examples/BigGridDemo.java @@ -32,19 +32,28 @@ import org.apache.poi.xssf.usermodel.*; /** * Demonstrates a workaround you can use to generate large workbooks and avoid OutOfMemory exception. * - * The trick is as follows: + * Note - You probably don't want to use this approach any more! POI + * now includes the SXSSF which handles all of this for you, you should + * be using that instead! This code remains mostly for historical interest. + *

+ * See + * http://poi.apache.org/spreadsheet/how-to.html#sxssf. + *

+ * If you really want to use this approach, which is also the one that SXSSF + * does for you, it works as follows: + * * 1. create a template workbook, create sheets and global objects such as cell styles, number formats, etc. * 2. create an application that streams data in a text file * 3. Substitute the sheet in the template with the generated data * *

- * Since 3.8-beta3 POI provides a low-memory footprint SXSSF API which implementing the "BigGridDemo" strategy. - * XSSF is an API-compatible streaming extension of XSSF to be used when - * very large spreadsheets have to be produced, and heap space is limited. - * SXSSF achieves its low memory footprint by limiting access to the rows that - * are within a sliding window, while XSSF gives access to all rows in the - * document. Older rows that are no longer in the window become inaccessible, - * as they are written to the disk. + * Since 3.8 POI provides a low-memory footprint SXSSF API, which implements + * ths "BigGridDemo" strategy. SXSSF is an API-compatible streaming extension + * of XSSF to be used when very large spreadsheets have to be produced, and + * heap space is limited. SXSSF achieves its low memory footprint by limiting + * access to the rows that are within a sliding window, while XSSF gives access + * to all rows in the document. Older rows that are no longer in the window + * become inaccessible, as they are written to the disk. *

* See * http://poi.apache.org/spreadsheet/how-to.html#sxssf.