diff options
author | Nick Burch <nick@apache.org> | 2015-08-15 07:29:27 +0000 |
---|---|---|
committer | Nick Burch <nick@apache.org> | 2015-08-15 07:29:27 +0000 |
commit | b962e1b2f2d36965fed71adbbd8871f47d13aa0a (patch) | |
tree | 511b901c125dfef817ba47440ec13bd26ca91fe1 /src/examples | |
parent | 45ef78d6225656c68f684680283c38942ce91610 (diff) | |
download | poi-b962e1b2f2d36965fed71adbbd8871f47d13aa0a.tar.gz poi-b962e1b2f2d36965fed71adbbd8871f47d13aa0a.zip |
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
Diffstat (limited to 'src/examples')
-rw-r--r-- | src/examples/src/org/apache/poi/xssf/usermodel/examples/BigGridDemo.java | 25 |
1 files 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 d9928151aa..e2b03711cf 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 <em>don't want to use this approach any more</em>! 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. + * <p> + * See <a "http://poi.apache.org/spreadsheet/how-to.html#sxssf"> + * http://poi.apache.org/spreadsheet/how-to.html#sxssf</a>. + * <p> + * 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 * * <p> - * 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. * </p> * See <a "http://poi.apache.org/spreadsheet/how-to.html#sxssf"> * http://poi.apache.org/spreadsheet/how-to.html#sxssf</a>. |