Can u give me the simple code snippt using org.apache.poi.ss.formula.FormulaParser.
FormulaParser class having the method parse().But it returns ptg[].i dont know where is the ptg class…
Please guide me to use formulaParse to parse the excel sheet formula…
Saravanan
Ptg[]is a array of tokens which represents the formula in the cell.Suppose in my excel sheet I have as cell with a formula as
Running this through a FormulaParser gives me an array which I have printed out as shown below
Result
As you can see this breaks down each element in the formula into the respective cell location or operator
AddPtg for
+and SubtractPtg for-operatorThis is a simple example, you can try out more complex stuff