Parses the excel ptgs into a parse tree
| Method from jxl.biff.formula.TokenFormulaParser Detail: |
public void adjustRelativeCellReferences(int colAdjust,
int rowAdjust) {
root.adjustRelativeCellReferences(colAdjust, 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) {
root.columnInserted(sheetIndex, col, 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) {
root.columnRemoved(sheetIndex, col, 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() {
return root.getBytes();
}
Gets the bytes for the formula. This takes into account any
token mapping necessary because of shared formulas |
public String getFormula() {
StringBuffer sb = new StringBuffer();
root.getString(sb);
return sb.toString();
}
Gets the formula as a string |
public boolean handleImportedCellReferences() {
root.handleImportedCellReferences();
return root.isValid();
}
If this formula was on an imported sheet, check that
cell references to another sheet are warned appropriately |
public void parse() throws FormulaException {
parseSubExpression(tokenData.length);
// Finally, there should be one thing left on the stack. Get that
// and add it to the root node
root = (ParseItem) tokenStack.pop();
Assert.verify(tokenStack.empty());
}
Parses the sublist of tokens. In most cases this will equate to
the full list |
public void rowInserted(int sheetIndex,
int row,
boolean currentSheet) {
root.rowInserted(sheetIndex, row, 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) {
root.rowRemoved(sheetIndex, row, 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 |