I have an excel file that has formulas in some cells and some input fields based on which value is being computed in the Formula Cell.
After setting the values in the respective cells using apache poi setCellValue()
The Values are being set in the excel. This part is working. Then I am running
FormulaEvaluator evaluator = workbook.getCreationHelper().createFormulaEvaluator();
evaluator.evaluate(cell);
where the cell is the place where I have the formula and also it has some pre-computed value.
My problem was that, after running the FormulaEvaluator
when I am fetching the cell value using cell.getNumericCellValue()
it is fetching me the pre-computed or older cell value instead of new computed values from the new values set in the cells.