InternalWorkbook to pass to a HSSFWorkbook,
to finally give to HSSFFormulaParser,
and this will build you stub ones.
Since you're working with the EventUserModel, you
wouldn't want to get a full InternalWorkbook and
HSSFWorkbook, as they would eat too much memory.
Instead, you should collect a few key records as they
go past, then call this once you have them to build a
stub InternalWorkbook, and from that a stub
HSSFWorkbook, to use with the HSSFFormulaParser.
The records you should collect are:
* ExternSheetRecord
* BoundSheetRecord
You should probably also collect SSTRecord,
but it's not required to pass this in.
To help, this class includes a HSSFListener wrapper
that will do the collecting for you.
| Modifier and Type | Class and Description |
|---|---|
| public static class | EventWorkbookBuilder.
A wrapping HSSFListener which will collect
|
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static InternalWorkbook | Returns: A stub Workbook suitable for use withHSSFFormulaParserThe ExternSheetRecords in your file externs, BoundSheetRecord[] The BoundSheetRecords in your file bounds, SSTRecord The SSTRecord in your file. sst)Creates a stub Workbook from the supplied records,
suitable for use with the |
| public static InternalWorkbook | Returns: A stub Workbook suitable for use withHSSFFormulaParserThe ExternSheetRecords in your file externs, BoundSheetRecord[] The BoundSheetRecords in your file bounds)Creates a stub workbook from the supplied records,
suitable for use with the |
| EventWorkbookBuilder | back to summary |
|---|---|
| public EventWorkbookBuilder() | |
| createStubWorkbook | back to summary |
|---|---|
| public static InternalWorkbook createStubWorkbook(ExternSheetRecord[] externs, BoundSheetRecord[] bounds, SSTRecord sst) Creates a stub Workbook from the supplied records,
suitable for use with the
| |
| createStubWorkbook | back to summary |
|---|---|
| public static InternalWorkbook createStubWorkbook(ExternSheetRecord[] externs, BoundSheetRecord[] bounds) Creates a stub workbook from the supplied records,
suitable for use with the
| |
BoundSheetRecords and ExternSheetRecords as
they go past, so you can create a Stub InternalWorkbook from
them once required.
| Modifier and Type | Field and Description |
|---|---|
| private final List | |
| private final HSSFListener | |
| private final List | |
| private SSTRecord |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public BoundSheetRecord[] | |
| public ExternSheetRecord[] | |
| public SSTRecord | |
| public HSSFWorkbook | |
| public InternalWorkbook | |
| public void | processRecord(Record
the record to be processed record)Implements org. Process this record ourselves, and then pass it on to our child listener |
| public void | processRecordInternally(Record
the record to be processed record)Process the record ourselves, but do not pass it on to the child Listener. |
| boundSheetRecords | back to summary |
|---|---|
| private final List<BoundSheetRecord> boundSheetRecords | |
| childListener | back to summary |
|---|---|
| private final HSSFListener childListener | |
| externSheetRecords | back to summary |
|---|---|
| private final List<ExternSheetRecord> externSheetRecords | |
| sstRecord | back to summary |
|---|---|
| private SSTRecord sstRecord | |
| SheetRecordCollectingListener | back to summary |
|---|---|
| public SheetRecordCollectingListener(HSSFListener childListener) | |
| getBoundSheetRecords | back to summary |
|---|---|
| public BoundSheetRecord[] getBoundSheetRecords() | |
| getExternSheetRecords | back to summary |
|---|---|
| public ExternSheetRecord[] getExternSheetRecords() | |
| getSSTRecord | back to summary |
|---|---|
| public SSTRecord getSSTRecord() | |
| getStubHSSFWorkbook | back to summary |
|---|---|
| public HSSFWorkbook getStubHSSFWorkbook() | |
| getStubWorkbook | back to summary |
|---|---|
| public InternalWorkbook getStubWorkbook() | |
| processRecord | back to summary |
|---|---|
| public void processRecord(Record record) Implements org. Process this record ourselves, and then pass it on to our child listener
| |
| processRecordInternally | back to summary |
|---|---|
| public void processRecordInternally(Record record) Process the record ourselves, but do not pass it on to the child Listener.
| |