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
This commit is contained in:
parent
6be4fc05d2
commit
2df37edbae
@ -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>.
|
||||
|
Loading…
Reference in New Issue
Block a user