jxl.read.biff
Class SharedNumberFormulaRecord
java.lang.Object
|
+--jxl.biff.RecordData
|
+--jxl.read.biff.CellValue
|
+--jxl.read.biff.BaseSharedFormulaRecord
|
+--jxl.read.biff.SharedNumberFormulaRecord
- All Implemented Interfaces:
- Cell, FormulaCell, FormulaData, NumberCell, NumberFormulaCell
- public class SharedNumberFormulaRecord
- extends BaseSharedFormulaRecord
- implements NumberCell, FormulaData, NumberFormulaCell
A number formula record, manufactured out of the Shared Formula
"optimization"
Method Summary |
java.lang.String |
getContents()
Accessor for the contents as a string |
byte[] |
getFormulaData()
Gets the raw bytes for the formula. |
CellType |
getType()
Accessor for the cell type |
double |
getValue()
Accessor for the value |
(package private) void |
setNumberFormat(java.text.NumberFormat f)
Sets the format for the number based on the Excel spreadsheets' format. |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
value
private double value
- The value of this number
format
private java.text.NumberFormat format
- The cell format
formattingRecords
private FormattingRecords formattingRecords
- A handle to the formatting records
defaultFormat
private static java.text.DecimalFormat defaultFormat
- The string format for the double value
SharedNumberFormulaRecord
public SharedNumberFormulaRecord(Record t,
double v,
FormattingRecords fr,
ExternalSheet es,
SheetImpl si)
- Constructs this number
- Parameters:
f
- the formular
- the zero based rowval
- the valuesi
- the sheet
setNumberFormat
final void setNumberFormat(java.text.NumberFormat f)
- Sets the format for the number based on the Excel spreadsheets' format.
This is called from SheetImpl when it has been definitely established
that this cell is a number and not a date
- Parameters:
f
- the format
getValue
public double getValue()
- Accessor for the value
- Specified by:
getValue
in interface NumberCell
- Returns:
- the value
getContents
public java.lang.String getContents()
- Accessor for the contents as a string
- Specified by:
getContents
in interface Cell
- Returns:
- the value as a string
getType
public CellType getType()
- Accessor for the cell type
- Specified by:
getType
in interface Cell
- Returns:
- the cell type
getFormulaData
public byte[] getFormulaData()
throws FormulaException
- 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