public class EventWorkbookBuilder
extends java.lang.Object
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 |
---|---|
static class |
EventWorkbookBuilder.SheetRecordCollectingListener
A wrapping HSSFListener which will collect
BoundSheetRecord s and ExternSheetRecord s as
they go past, so you can create a Stub InternalWorkbook from
them once required. |
Constructor and Description |
---|
EventWorkbookBuilder() |
Modifier and Type | Method and Description |
---|---|
static InternalWorkbook |
createStubWorkbook(ExternSheetRecord[] externs,
BoundSheetRecord[] bounds)
Creates a stub workbook from the supplied records,
suitable for use with the
HSSFFormulaParser |
static InternalWorkbook |
createStubWorkbook(ExternSheetRecord[] externs,
BoundSheetRecord[] bounds,
SSTRecord sst)
Creates a stub Workbook from the supplied records,
suitable for use with the
HSSFFormulaParser |
public static InternalWorkbook createStubWorkbook(ExternSheetRecord[] externs, BoundSheetRecord[] bounds, SSTRecord sst)
HSSFFormulaParser
externs
- The ExternSheetRecords in your filebounds
- The BoundSheetRecords in your filesst
- The SSTRecord in your file.HSSFFormulaParser
public static InternalWorkbook createStubWorkbook(ExternSheetRecord[] externs, BoundSheetRecord[] bounds)
HSSFFormulaParser
externs
- The ExternSheetRecords in your filebounds
- The BoundSheetRecords in your fileHSSFFormulaParser
Copyright 2020 The Apache Software Foundation or its licensors, as applicable.