| |
|
| java.lang.Object org.apache.poi.hssf.record.Record org.apache.poi.hssf.record.FormulaRecord
FormulaRecord | public class FormulaRecord extends Record implements CellValueRecordInterface,Comparable(Code) | | Formula Record.
REFERENCE: PG 317/444 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
author: Andrew C. Oliver (acoliver at apache dot org) author: Jason Height (jheight at chariot dot net dot au) version: 2.0-pre |
Field Summary | |
final public static short | sid |
sid | final public static short sid(Code) | | |
FormulaRecord | public FormulaRecord()(Code) | | Creates new FormulaRecord
|
FormulaRecord | public FormulaRecord(RecordInputStream in)(Code) | | Constructs a Formula record and sets its fields appropriately.
Note - id must be 0x06 (NOT 0x406 see MSKB #Q184647 for an
"explanation of this bug in the documentation) or an exception
will be throw upon validation
Parameters: in - the RecordInputstream to read the record from |
getColumn | public short getColumn()(Code) | | |
getExpressionLength | public short getExpressionLength()(Code) | | get the length (in number of tokens) of the expression
expression length |
getNumberOfExpressionTokens | public int getNumberOfExpressionTokens()(Code) | | get the size of the stack
size of the stack |
getOptions | public short getOptions()(Code) | | get the option flags
bitmask |
getParsedExpression | public List getParsedExpression()(Code) | | get the stack as a list
list of tokens (casts stack to a list and returns it!)this method can return null is we are unable to create Ptgs from existing excel filecallers should check for null! |
getRecordSize | public int getRecordSize()(Code) | | |
getRow | public int getRow()(Code) | | |
getSid | public short getSid()(Code) | | |
getValue | public double getValue()(Code) | | get the calculated value of the formula
calculated value |
getXFIndex | public short getXFIndex()(Code) | | |
isInValueSection | public boolean isInValueSection()(Code) | | |
isSharedFormula | public boolean isSharedFormula()(Code) | | |
isValue | public boolean isValue()(Code) | | |
peekExpressionToken | public Ptg peekExpressionToken()(Code) | | peek at the token on the top of stack
Ptg - the token |
popExpressionToken | public Ptg popExpressionToken()(Code) | | pop a token off of the stack
Ptg - the token |
pushExpressionToken | public void pushExpressionToken(Ptg ptg)(Code) | | push a token onto the stack
Parameters: ptg - the token |
serialize | public int serialize(int offset, byte[] data)(Code) | | called by the class that is responsible for writing this sucker.
Subclasses should implement this so that their data is passed back in a
byte array.
byte array containing instance data |
setColumn | public void setColumn(short column)(Code) | | |
setExpressionLength | public void setExpressionLength(short len)(Code) | | set the length (in number of tokens) of the expression
Parameters: len - length |
setOptions | public void setOptions(short options)(Code) | | set the option flags
Parameters: options - bitmask |
setParsedExpression | public void setParsedExpression(Stack ptgs)(Code) | | |
setRow | public void setRow(int row)(Code) | | |
setSharedFormula | public void setSharedFormula(boolean flag)(Code) | | |
setValue | public void setValue(double value)(Code) | | set the calculated value of the formula
Parameters: value - calculated value |
setXFIndex | public void setXFIndex(short xf)(Code) | | |
validateSid | protected void validateSid(short id)(Code) | | called by constructor, should throw runtime exception in the event of a
record passed with a differing ID.
Parameters: id - alleged id for this record |
|
|
|