jxl.read.biff
Class SharedDateFormulaRecord
java.lang.Object
|
+--jxl.biff.RecordData
|
+--jxl.read.biff.CellValue
|
+--jxl.read.biff.BaseSharedFormulaRecord
|
+--jxl.read.biff.SharedDateFormulaRecord
- All Implemented Interfaces:
- Cell, DateCell, FormulaData
- public class SharedDateFormulaRecord
- extends BaseSharedFormulaRecord
- implements DateCell, FormulaData
A number formula record, manufactured out of the Shared Formula
"optimization"
Field Summary |
private DateRecord |
dateRecord
Re-use the date record to handle all the formatting information and
date calculations |
private double |
value
The double value |
Method Summary |
java.lang.String |
getContents()
Accessor for the contents as a string |
java.util.Date |
getDate()
Gets the date |
java.text.DateFormat |
getDateFormat()
Gets the DateFormat used to format the cell. |
byte[] |
getFormulaData()
Gets the raw bytes for the formula. |
CellType |
getType()
Accessor for the cell type |
double |
getValue()
Accessor for the value |
boolean |
isTime()
Indicates whether the date value contained in this cell refers to a date,
or merely a time |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
dateRecord
private DateRecord dateRecord
- Re-use the date record to handle all the formatting information and
date calculations
value
private double value
- The double value
SharedDateFormulaRecord
public SharedDateFormulaRecord(SharedNumberFormulaRecord nfr,
FormattingRecords fr,
boolean nf,
SheetImpl si)
- Constructs this number
- Parameters:
f
- the formular
- the zero based rowval
- the valuenf
- flag indicating whether this uses the 1904 date systemsi
- the sheet
getValue
public double getValue()
- Accessor for the value
- 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
getDate
public java.util.Date getDate()
- Gets the date
- Specified by:
getDate
in interface DateCell
- Returns:
- the date
isTime
public boolean isTime()
- Indicates whether the date value contained in this cell refers to a date,
or merely a time
- Specified by:
isTime
in interface DateCell
- Returns:
- TRUE if the value refers to a time
getDateFormat
public java.text.DateFormat getDateFormat()
- Gets the DateFormat used to format the cell. This will normally be
the format specified in the excel spreadsheet, but in the event of any
difficulty parsing this, it will revert to the default date/time format.
- Specified by:
getDateFormat
in interface DateCell
- Returns:
- the DateFormat object used to format the date in the original
excel cell