jxl.read.biff
Class SharedErrorFormulaRecord

java.lang.Object
  extended byjxl.biff.RecordData
      extended byjxl.read.biff.CellValue
          extended byjxl.read.biff.BaseSharedFormulaRecord
              extended byjxl.read.biff.SharedErrorFormulaRecord
All Implemented Interfaces:
Cell, jxl.read.biff.CellFeaturesAccessor, ErrorCell, ErrorFormulaCell, FormulaCell, FormulaData

public class SharedErrorFormulaRecord
extends BaseSharedFormulaRecord
implements ErrorCell, FormulaData, ErrorFormulaCell

A number formula record, manufactured out of the Shared Formula "optimization"


Constructor Summary
SharedErrorFormulaRecord(Record t, File excelFile, int ec, FormattingRecords fr, ExternalSheet es, WorkbookMethods nt, SheetImpl si)
          Constructs this number
 
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.
 byte[] getFormulaData()
          Gets the raw bytes for the formula.
 CellType getType()
          Accessor for the cell type
 
Methods inherited from class jxl.read.biff.BaseSharedFormulaRecord
getExternalSheet, getFormula, getNameTable, getRecord, getTokens
 
Methods inherited from class jxl.read.biff.CellValue
getCellFeatures, getCellFormat, getColumn, getRow, getSheet, getXFIndex, isHidden, setCellFeatures
 
Methods inherited from class jxl.biff.RecordData
getCode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface jxl.Cell
getCellFeatures, getCellFormat, getColumn, getRow, isHidden
 
Methods inherited from interface jxl.FormulaCell
getFormula
 

Constructor Detail

SharedErrorFormulaRecord

public SharedErrorFormulaRecord(Record t,
                                File excelFile,
                                int ec,
                                FormattingRecords fr,
                                ExternalSheet es,
                                WorkbookMethods nt,
                                SheetImpl si)
Constructs this number

Parameters:
t - the data
excelFile - the excel biff data
fr - the formatting records
es - the external sheet
nt - the name table
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()
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
Throws:
FormulaException