Home » JCraft » jxl » biff » formula » [javadoc | source]
jxl.biff.formula
public class: FormulaParser [javadoc | source]
java.lang.Object
   jxl.biff.formula.FormulaParser
Parses the formula passed in (either as parsed strings or as a string) into a tree of operators and operands
Constructor:
 public FormulaParser(String form,
    ExternalSheet es,
    WorkbookMethods nt,
    WorkbookSettings ws) 
    Constructor which creates the parse tree out of the string
    Parameters:
    form - the formula string
    es - the external sheet handle
    nt - the name table
    ws - the workbook settings
 public FormulaParser(byte[] tokens,
    Cell rt,
    ExternalSheet es,
    WorkbookMethods nt,
    WorkbookSettings ws) throws FormulaException 
    Constructor which creates the parse tree out of tokens
    Parameters:
    tokens - the list of parsed tokens
    rt - the cell containing the formula
    es - a handle to the external sheet
    nt - a handle to the name table
    ws - the workbook settings
    pc - the parse context
    Throws:
    FormulaException -
    exception: FormulaException -
 public FormulaParser(String form,
    ExternalSheet es,
    WorkbookMethods nt,
    WorkbookSettings ws,
    ParseContext pc) 
    Constructor which creates the parse tree out of the string
    Parameters:
    form - the formula string
    es - the external sheet handle
    nt - the name table
    ws - the workbook settings
    pc - the context of the parse
 public FormulaParser(byte[] tokens,
    Cell rt,
    ExternalSheet es,
    WorkbookMethods nt,
    WorkbookSettings ws,
    ParseContext pc) throws FormulaException 
    Constructor which creates the parse tree out of tokens
    Parameters:
    tokens - the list of parsed tokens
    rt - the cell containing the formula
    es - a handle to the external sheet
    nt - a handle to the name table
    ws - the workbook settings
    pc - the parse context
    Throws:
    FormulaException -
    exception: FormulaException -
Method from jxl.biff.formula.FormulaParser Summary:
adjustRelativeCellReferences,   columnInserted,   columnRemoved,   getBytes,   getFormula,   handleImportedCellReferences,   parse,   rowInserted,   rowRemoved
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from jxl.biff.formula.FormulaParser Detail:
 public  void adjustRelativeCellReferences(int colAdjust,
    int rowAdjust) 
    Adjusts all the relative cell references in this formula by the amount specified. Used when copying formulas
 public  void columnInserted(int sheetIndex,
    int col,
    boolean currentSheet) 
    Called when a column is inserted on the specified sheet. Tells the formula parser to update all of its cell references beyond this column
 public  void columnRemoved(int sheetIndex,
    int col,
    boolean currentSheet) 
    Called when a column is inserted on the specified sheet. Tells the formula parser to update all of its cell references beyond this column
 public byte[] getBytes() 
    Gets the bytes for the formula. This takes into account any token mapping necessary because of shared formulas
 public String getFormula() throws FormulaException 
    Gets the formula as a string
 public boolean handleImportedCellReferences() 
    If this formula was on an imported sheet, check that cell references to another sheet are warned appropriately
 public  void parse() throws FormulaException 
    Parses the formula into a parse tree
 public  void rowInserted(int sheetIndex,
    int row,
    boolean currentSheet) 
    Called when a column is inserted on the specified sheet. Tells the formula parser to update all of its cell references beyond this column
 public  void rowRemoved(int sheetIndex,
    int row,
    boolean currentSheet) 
    Called when a column is inserted on the specified sheet. Tells the formula parser to update all of its cell references beyond this column