|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.poi.hssf.model.HSSFFormulaParser
public final class HSSFFormulaParser
HSSF wrapper for the FormulaParser
and FormulaRenderer
Method Summary | |
---|---|
static Ptg[] |
parse(java.lang.String formula,
HSSFWorkbook workbook)
Convenience method for parsing cell formulas. |
static Ptg[] |
parse(java.lang.String formula,
HSSFWorkbook workbook,
int formulaType)
|
static Ptg[] |
parse(java.lang.String formula,
HSSFWorkbook workbook,
int formulaType,
int sheetIndex)
|
static java.lang.String |
toFormulaString(HSSFWorkbook book,
Ptg[] ptgs)
Static method to convert an array of Ptg s in RPN order
to a human readable string format in infix mode. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Ptg[] parse(java.lang.String formula, HSSFWorkbook workbook) throws FormulaParseException
parse(String, HSSFWorkbook, int, int)
FormulaParseException
public static Ptg[] parse(java.lang.String formula, HSSFWorkbook workbook, int formulaType) throws FormulaParseException
formulaType
- a constant from FormulaType
FormulaParseException
- if the formula has incorrect syntax or is otherwise invalidpublic static Ptg[] parse(java.lang.String formula, HSSFWorkbook workbook, int formulaType, int sheetIndex) throws FormulaParseException
formula
- the formula to parseworkbook
- the parent workbookformulaType
- a constant from FormulaType
sheetIndex
- the 0-based index of the sheet this formula belongs to.
The sheet index is required to resolve sheet-level names. -1
means that
the scope of the name will be ignored and the parser will match named ranges only by name
FormulaParseException
- if the formula has incorrect syntax or is otherwise invalidpublic static java.lang.String toFormulaString(HSSFWorkbook book, Ptg[] ptgs)
Ptg
s in RPN order
to a human readable string format in infix mode.
book
- used for defined names and 3D referencesptgs
- must not be null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |