jxl.read.biff
Class NumberFormulaRecord
java.lang.Object
|
+--jxl.biff.RecordData
|
+--jxl.read.biff.CellValue
|
+--jxl.read.biff.NumberFormulaRecord
- All Implemented Interfaces:
- Cell, FormulaCell, FormulaData, NumberCell, NumberFormulaCell
- class NumberFormulaRecord
- extends CellValue
- implements NumberCell, FormulaData, NumberFormulaCell
A formula's last calculated value
Field Summary |
private byte[] |
data
The raw data |
private static java.text.DecimalFormat |
defaultFormat
The string format for the double value |
private ExternalSheet |
externalSheet
A handle to the class needed to access external sheets |
private java.text.NumberFormat |
format
The number format |
private java.lang.String |
formulaString
The formula as an excel string |
private double |
value
The last calculated value of the formula |
Method Summary |
java.lang.String |
getContents()
Returns the numerical value as a string |
java.lang.String |
getFormula()
Gets the formula as an excel string |
byte[] |
getFormulaData()
Gets the raw bytes for the formula. |
CellType |
getType()
Returns the cell type |
double |
getValue()
Interface method which returns the value |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
value
private double value
- The last calculated value of the formula
format
private java.text.NumberFormat format
- The number format
defaultFormat
private static final java.text.DecimalFormat defaultFormat
- The string format for the double value
formulaString
private java.lang.String formulaString
- The formula as an excel string
externalSheet
private ExternalSheet externalSheet
- A handle to the class needed to access external sheets
data
private byte[] data
- The raw data
NumberFormulaRecord
public NumberFormulaRecord(Record t,
FormattingRecords fr,
ExternalSheet es,
SheetImpl si)
- Constructs this object from the raw data
- Parameters:
t
- the raw datafr
- the formatting recordes
- the external sheetsi
- the sheet
getValue
public double getValue()
- Interface method which returns the value
- Specified by:
getValue
in interface NumberCell
- Returns:
- the last calculated value of the formula
getContents
public java.lang.String getContents()
- Returns the numerical value as a string
- Specified by:
getContents
in interface Cell
- Returns:
- The numerical value of the formula as a string
getType
public CellType getType()
- Returns the cell type
- Specified by:
getType
in interface Cell
- Returns:
- The cell type
getFormulaData
public byte[] getFormulaData()
- Gets the raw bytes for the formula. This will include the
parsed tokens array. Used when copying spreadsheets
- Specified by:
getFormulaData
in interface FormulaData
- Returns:
- the raw record data
getFormula
public java.lang.String getFormula()
throws FormulaException
- Gets the formula as an excel string
- Specified by:
getFormula
in interface FormulaCell
- Returns:
- the formula as an excel string