Package org.apache.poi.hssf.record
Class SharedFormulaRecord
java.lang.Object
org.apache.poi.hssf.record.RecordBase
org.apache.poi.hssf.record.Record
org.apache.poi.hssf.record.StandardRecord
org.apache.poi.hssf.record.SharedValueRecordBase
org.apache.poi.hssf.record.SharedFormulaRecord
- All Implemented Interfaces:
org.apache.poi.common.Duplicatable,GenericRecord
Primarily used as an excel optimization so that multiple similar formulas are not
written out too many times. We should recognize this record and serialize as is
since this is used when reading templates.
Note: the documentation says that the SID is BC where biffviewer reports 4BC. The hex dump shows that the two byte sid representation to be 'BC 04' that is consistent with the other high byte record types.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptioncopy()Ptg[]getFormulaTokens(FormulaRecord formula) Convert formula into an array ofPtgtokens.shortgetSid()return the non static version of the id for this record.booleanisFormulaSame(SharedFormulaRecord other) Methods inherited from class org.apache.poi.hssf.record.SharedValueRecordBase
getFirstColumn, getFirstRow, getLastColumn, getLastRow, getRange, isFirstCell, isInRange, serializeMethods inherited from class org.apache.poi.hssf.record.StandardRecord
getRecordSize, serializeMethods inherited from class org.apache.poi.hssf.record.Record
cloneViaReserialise, serialize, toStringMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.poi.common.usermodel.GenericRecord
getGenericChildren
-
Field Details
-
sid
public static final short sid- See Also:
-
-
Constructor Details
-
SharedFormulaRecord
public SharedFormulaRecord() -
SharedFormulaRecord
- Parameters:
in- the RecordInputstream to read the record from
-
-
Method Details
-
getSid
public short getSid()Description copied from class:Recordreturn the non static version of the id for this record. -
getFormulaTokens
Convert formula into an array ofPtgtokens.- Parameters:
formula- The record to break into tokens, cannot be null- Returns:
- the equivalent
Ptgarray that the formula would have, were it not shared.
-
copy
- Specified by:
copyin interfaceorg.apache.poi.common.Duplicatable- Specified by:
copyin classStandardRecord
-
getGenericRecordType
- Specified by:
getGenericRecordTypein interfaceGenericRecord- Specified by:
getGenericRecordTypein classRecord
-
getGenericProperties
-