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. |
java.text.NumberFormat |
getNumberFormat()
Gets the NumberFormat used to format this cell. |
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,
NameTable nt,
SheetImpl si)
- Constructs this number
- Parameters:
t
- the datav
- the valuefr
- the formatting recordses
- the external sheetnt
- the name tablesi
- 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
getNumberFormat
public java.text.NumberFormat getNumberFormat()
- Gets the NumberFormat used to format this cell. This is the java
equivalent of the Excel format
- Specified by:
getNumberFormat
in interface NumberCell
- Returns:
- the NumberFormat used to format the cell