Bug 64258 - Alternative approach for TDIST function formula evaluation
Summary: Alternative approach for TDIST function formula evaluation
Status: NEW
Alias: None
Product: POI
Classification: Unclassified
Component: XSSF (show other bugs)
Version: 4.1.2-FINAL
Hardware: PC All
: P2 major (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-23 13:12 UTC by Siddharam Nadgunde
Modified: 2020-05-14 16:24 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Siddharam Nadgunde 2020-03-23 13:12:04 UTC
I am trying to evaluate formula using the below approach:

FormulaEvaluator evaluator = workbook.getCreationHelper().createFormulaEvaluator();
for (Sheet sheet : workbook) {
   for (Row r : sheet) {
     for (Cell c : r) {
         if (c.getCellTypeEnum().equals(CellType.FORMULA)) {
            try {
              evaluator.evaluateFormulaCellEnum(c);
            } catch (Exception e) {
              log.info("Exception: " + e.getMessage(), e);
            }
         }
     }
   }
}

And the exccel formula is : IF(G7<0,TDIST(ABS(G7),MIN(C7,C$6),1),"-")

After executing this I got below exception:

org.apache.poi.ss.formula.eval.NotImplementedFunctionException: TDIST

So, my question is is there any alternative solution to evaluate the given formula by Apache POI library in Java?

Please kindly help me for the same.

Thanks in advance.