Package org.apache.poi.ss.formula
Class FormulaRenderer
- java.lang.Object
-
- org.apache.poi.ss.formula.FormulaRenderer
-
@Internal public class FormulaRenderer extends java.lang.Object
Common logic for rendering formulas.
-
-
Constructor Summary
Constructors Constructor Description FormulaRenderer()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringtoFormulaCopyText(FormulaRenderingWorkbook book, Ptg[] tokens, java.lang.String formula)static java.lang.StringtoFormulaEditText(FormulaRenderingWorkbook book, Ptg[] tokens, java.lang.String formula)static java.lang.StringtoFormulaString(FormulaRenderingWorkbook book, Ptg[] ptgs)Static method to convert an array ofPtgs in RPN order to a human readable string format in infix mode.static java.lang.StringtoInternalFormulaString(FormulaRenderingWorkbook book, Ptg[] ptgs)Static method to convert an array ofPtgs in RPN order to internal string format for storing into file.static Ptg[][]unwrapPtgArrays(Ptg[] ptgs)Static method to convert an RPN ptgs in the form of (areaPtg1, areaPtg2, ...) to Ptg[][].
-
-
-
Method Detail
-
toFormulaString
public static java.lang.String toFormulaString(FormulaRenderingWorkbook book, Ptg[] ptgs)
Static method to convert an array ofPtgs in RPN order to a human readable string format in infix mode.- Parameters:
book- used for defined names and 3D referencesptgs- must not benull- Returns:
- a human readable String
-
toInternalFormulaString
public static java.lang.String toInternalFormulaString(FormulaRenderingWorkbook book, Ptg[] ptgs)
Static method to convert an array ofPtgs in RPN order to internal string format for storing into file.- Parameters:
book- used for defined names and 3D referencesptgs- must not benull- Returns:
- a human readable String
-
toFormulaEditText
public static java.lang.String toFormulaEditText(FormulaRenderingWorkbook book, Ptg[] tokens, java.lang.String formula)
-
unwrapPtgArrays
public static Ptg[][] unwrapPtgArrays(Ptg[] ptgs)
Static method to convert an RPN ptgs in the form of (areaPtg1, areaPtg2, ...) to Ptg[][].- Parameters:
ptgs- must not benull- Returns:
- a human readable String
- Since:
- 3.9.6
-
toFormulaCopyText
public static java.lang.String toFormulaCopyText(FormulaRenderingWorkbook book, Ptg[] tokens, java.lang.String formula)
-
-