jxl.read.biff
Class StringFormulaRecord

java.lang.Object
  |
  +--jxl.biff.RecordData
        |
        +--jxl.read.biff.CellValue
              |
              +--jxl.read.biff.StringFormulaRecord
All Implemented Interfaces:
Cell, FormulaCell, FormulaData, LabelCell, StringFormulaCell

class StringFormulaRecord
extends CellValue
implements LabelCell, FormulaData, StringFormulaCell

A string formula's last calculated value


Field Summary
private  byte[] data
          The raw data
private  ExternalSheet externalSheet
          A handle to the class needed to access external sheets
private  java.lang.String formulaString
          The formula as an excel string
private  java.lang.String value
          The last calculated value of the formula
 
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
StringFormulaRecord(Record t, File excelFile, FormattingRecords fr, ExternalSheet es, SheetImpl si, WorkbookSettings ws)
          Constructs this object from the raw data.
 
Method Summary
 java.lang.String getContents()
          Interface method which returns the value
 java.lang.String getFormula()
          Gets the formula as an excel string
 byte[] getFormulaData()
          Gets the raw bytes for the formula.
 java.lang.String getString()
          Interface method which returns the value
 CellType getType()
          Returns the cell type
private  void readString(byte[] data, WorkbookSettings ws)
          Reads in the string
 
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

value

private java.lang.String value
The last calculated value of the formula

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

StringFormulaRecord

public StringFormulaRecord(Record t,
                           File excelFile,
                           FormattingRecords fr,
                           ExternalSheet es,
                           SheetImpl si,
                           WorkbookSettings ws)
Constructs this object from the raw data. We need to use the excelFile to retrieve the String record which follows this formula record
Parameters:
excelFile - the excel file
t - the raw data
si - the sheet impl
Method Detail

readString

private void readString(byte[] data,
                        WorkbookSettings ws)
Reads in the string
Parameters:
data - the string data

getContents

public java.lang.String getContents()
Interface method which returns the value
Specified by:
getContents in interface Cell
Returns:
the last calculated value of the formula

getString

public java.lang.String getString()
Interface method which returns the value
Specified by:
getString in interface LabelCell
Returns:
the last calculated value of the formula

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 -