I am using Apache POI 3.9 and I need to use the Excel formula PERCENTILE and evaluate the formula from within Java.
The problem is that PERCENTILE is not supported.
I get a org.apache.poi.ss.formula.eval.NotImplementedException:
error
I have 3 possible solutions to my problem.
Write my own percentile function in java and contribute it to the Apache POI library (See http://poi.apache.org/spreadsheet/eval-devguide.html)
Take the relevant cells from the Excel sheet into java and calculate them using a function such as the one in Percentile calculation
Convert the PERCENTILE into a SMALL function such as instead of
=PERCENTILE(A1:A10,95%)
then=(SMALL(A1:A10,9)+SMALL(A1:A10,10))/2
At this point in time I need a speedy solution. For me, the third would be the best, but it doesn't give exactly the same results.
Does anyone have any ideas before I fallback on option 2 which is a bit messy?