jxl.read.biff
Class FormulaRecord

java.lang.Object
  |
  +--jxl.biff.RecordData
        |
        +--jxl.read.biff.CellValue
              |
              +--jxl.read.biff.FormulaRecord
All Implemented Interfaces:
Cell

class FormulaRecord
extends CellValue

A formula's last calculated value


Inner Class Summary
private static class FormulaRecord.IgnoreSharedFormula
          Static class for a dummy override, indicating that the formula passed in is not a shared formula
 
Field Summary
private  CellValue formula
          The "real" formula record - will be either a string a or a number
static FormulaRecord.IgnoreSharedFormula ignoreSharedFormula
           
private  boolean shared
          Flag to indicate whether this is a shared 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
FormulaRecord(Record t, File excelFile, FormattingRecords fr, ExternalSheet es, FormulaRecord.IgnoreSharedFormula i, SheetImpl si)
          Constructs this object from the raw data.
FormulaRecord(Record t, File excelFile, 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
(package private)  CellValue getFormula()
          Gets the "real" formula
 CellType getType()
          Returns the cell type
(package private)  boolean isShared()
          Interrogates this formula to determine if it forms part of a shared formula
 
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
 

Field Detail

formula

private CellValue formula
The "real" formula record - will be either a string a or a number

shared

private boolean shared
Flag to indicate whether this is a shared formula

ignoreSharedFormula

public static final FormulaRecord.IgnoreSharedFormula ignoreSharedFormula
Constructor Detail

FormulaRecord

public FormulaRecord(Record t,
                     File excelFile,
                     FormattingRecords fr,
                     ExternalSheet es,
                     SheetImpl si)
Constructs this object from the raw data. Creates either a NumberFormulaRecord or a StringFormulaRecord depending on whether this formula represents a numerical calculation or not
Parameters:
excelFile - the excel file
t - the raw data
es - the workbook, which contains the external sheet references
si - the sheet

FormulaRecord

public FormulaRecord(Record t,
                     File excelFile,
                     FormattingRecords fr,
                     ExternalSheet es,
                     FormulaRecord.IgnoreSharedFormula i,
                     SheetImpl si)
Constructs this object from the raw data. Creates either a NumberFormulaRecord or a StringFormulaRecord depending on whether this formula represents a numerical calculation or not
Parameters:
excelFile - the excel file
t - the raw data
es - the workbook, which contains the external sheet references
i - a dummy override to indicate that we don't want to do any shared formula processing
si - the sheet impl
Method Detail

getContents

public java.lang.String getContents()
Returns the numerical value as a string
Returns:
The numerical value of the formula as a string

getType

public CellType getType()
Returns the cell type
Returns:
The cell type

getFormula

final CellValue getFormula()
Gets the "real" formula

isShared

final boolean isShared()
Interrogates this formula to determine if it forms part of a shared formula
Returns:
TRUE if this is shared formula, FALSE otherwise