Class FormulaRecordAggregate
java.lang.Object
org.apache.poi.hssf.record.RecordBase
org.apache.poi.hssf.record.aggregates.RecordAggregate
org.apache.poi.hssf.record.aggregates.FormulaRecordAggregate
- All Implemented Interfaces:
CellValueRecordInterface
public final class FormulaRecordAggregate
extends RecordAggregate
implements CellValueRecordInterface
The formula record aggregate is used to join together the formula record and it's
(optional) string record and (optional) Shared Formula Record (template reads, excel optimization).
- Author:
- Glen Stampoultzis (glens at apache.org), Vladimirs Abramovs(Vladimirs.Abramovs at exigenservices.com) - Array Formula support
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.poi.hssf.record.aggregates.RecordAggregate
RecordAggregate.PositionTrackingVisitor, RecordAggregate.RecordVisitor -
Constructor Summary
ConstructorsConstructorDescriptionFormulaRecordAggregate(FormulaRecord formulaRec, StringRecord stringRec, SharedValueManager svm) -
Method Summary
Modifier and TypeMethodDescriptionshortPtg[]intgetRow()debug only TODO - encapsulateshortbooleanvoidShould be called by any code which is either deleting this formula cell, or changing its type.removeArrayFormula(int rowIndex, int columnIndex) Removes an array formulavoidsetArrayFormula(CellRangeAddress r, Ptg[] ptgs) voidsetCachedBooleanResult(boolean value) voidsetCachedDoubleResult(double value) voidsetCachedErrorResult(int errorCode) voidsetCachedErrorResult(FormulaError error) voidsetCachedStringResult(String value) voidsetColumn(short col) voidsetParsedExpression(Ptg[] ptgs) Also checks for a related shared formula and unlinks it if foundvoidsetRow(int row) voidsetXFIndex(short xf) toString()voidvoidVisit each of the atomic BIFF records contained in thisRecordAggregatein the order that they should be written to file.Methods inherited from class org.apache.poi.hssf.record.aggregates.RecordAggregate
getRecordSize, serialize
-
Constructor Details
-
Method Details
-
getFormulaRecord
-
getStringRecord
debug only TODO - encapsulate -
getXFIndex
public short getXFIndex()- Specified by:
getXFIndexin interfaceCellValueRecordInterface
-
setXFIndex
public void setXFIndex(short xf) - Specified by:
setXFIndexin interfaceCellValueRecordInterface
-
setColumn
public void setColumn(short col) - Specified by:
setColumnin interfaceCellValueRecordInterface- Parameters:
col- the column this cell defines
-
setRow
public void setRow(int row) - Specified by:
setRowin interfaceCellValueRecordInterface- Parameters:
row- the row this cell occurs within
-
getColumn
public short getColumn()- Specified by:
getColumnin interfaceCellValueRecordInterface- Returns:
- the column this cell defines within the row
-
getRow
public int getRow()- Specified by:
getRowin interfaceCellValueRecordInterface- Returns:
- the row this cell occurs on
-
toString
-
visitContainedRecords
Description copied from class:RecordAggregateVisit each of the atomic BIFF records contained in thisRecordAggregatein the order that they should be written to file. Implementors may or may not return the actualRecords being used to manage POI's internal implementation. Callers should not assume either way, and therefore only attempt to modify thoseRecords after cloning- Specified by:
visitContainedRecordsin classRecordAggregate
-
getStringValue
-
setCachedStringResult
-
setCachedBooleanResult
public void setCachedBooleanResult(boolean value) -
setCachedErrorResult
public void setCachedErrorResult(int errorCode) -
setCachedErrorResult
-
setCachedDoubleResult
public void setCachedDoubleResult(double value) -
getFormulaTokens
-
setParsedExpression
Also checks for a related shared formula and unlinks it if found -
notifyFormulaChanging
public void notifyFormulaChanging()Should be called by any code which is either deleting this formula cell, or changing its type. This method gives the aggregate a chance to unlink any shared formula that may be involved with this cell formula. -
isPartOfArrayFormula
public boolean isPartOfArrayFormula() -
getArrayFormulaRange
-
setArrayFormula
-
removeArrayFormula
Removes an array formula- Returns:
- the range of the array formula containing the specified cell. Never
null
-