jxl.read.biff
Class ErrorFormulaRecord

java.lang.Object
  |
  +--jxl.biff.RecordData
        |
        +--jxl.read.biff.CellValue
              |
              +--jxl.read.biff.ErrorFormulaRecord
All Implemented Interfaces:
Cell, ErrorCell, ErrorFormulaCell, FormulaCell, FormulaData

class ErrorFormulaRecord
extends CellValue
implements ErrorCell, FormulaData, ErrorFormulaCell

An error resulting from the calculation of a formula


Field Summary
private  byte[] data
          The raw data
private  int errorCode
          The error code of this cell
private  ExternalSheet externalSheet
          A handle to the class needed to access external sheets
private  java.lang.String formulaString
          The formula as an excel string
 
Fields inherited from class jxl.read.biff.CellValue
column, format, formattingRecords, initialized, row, sheet, xfIndex
 
Fields inherited from class jxl.biff.RecordData
code, record
 
Constructor Summary
ErrorFormulaRecord(Record t, FormattingRecords fr, ExternalSheet es, SheetImpl si)
          Constructs this object from the raw data
 
Method Summary
 java.lang.String getContents()
          Returns the numerical value as a string
 int getErrorCode()
          Interface method which gets the error code for this cell.
 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
 
Methods inherited from class jxl.read.biff.CellValue
getCellFormat, getColumn, getRow, getSheet, getXFIndex, isHidden
 
Methods inherited from class jxl.biff.RecordData
getCode, getRecord
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 
Methods inherited from interface jxl.Cell
getCellFormat, getColumn, getRow, isHidden
 

Field Detail

errorCode

private int errorCode
The error code of this cell

externalSheet

private ExternalSheet externalSheet
A handle to the class needed to access external sheets

formulaString

private java.lang.String formulaString
The formula as an excel string

data

private byte[] data
The raw data
Constructor Detail

ErrorFormulaRecord

public ErrorFormulaRecord(Record t,
                          FormattingRecords fr,
                          ExternalSheet es,
                          SheetImpl si)
Constructs this object from the raw data
Parameters:
t - the raw data
fr - the formatting records
es - the external sheet
si - the sheet
Method Detail

getErrorCode

public int getErrorCode()
Interface method which gets the error code for this cell. If this cell does not represent an error, then it returns 0. Always use the method isError() to determine this prior to calling this method
Specified by:
getErrorCode in interface ErrorCell
Returns:
the error code if this cell contains an error, 0 otherwise

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
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
Throws:
FormulaException -