@gkamdar,
Thanks for the new XLSM file.
After an initial test, I am able to reproduce the issue as you mentioned by using your sample file and following sample code. I found incorrect results after formula calculations.
Workbook workbook = new Workbook("d:\\files\\sample_firstexecution_v24.4.xlsm");
Cells cells = workbook.getWorksheets().get("Output").getCells();
System.out.println(cells.get("E147").getStringValue());
System.out.println(cells.get("F147").getStringValue());
System.out.println(cells.get("G147").getStringValue());
System.out.println(cells.get("H147").getStringValue());
workbook.getSettings().getFormulaSettings().setEnableIterativeCalculation(true);
workbook.refreshDynamicArrayFormulas(true, new CalculationOptions());
workbook.calculateFormula();
System.out.println("After calculating formulas=====1");
System.out.println(cells.get("E147").getStringValue());
System.out.println(cells.get("F147").getStringValue());
System.out.println(cells.get("G147").getStringValue());
System.out.println(cells.get("H147").getStringValue());
workbook.getSettings().getFormulaSettings().setEnableIterativeCalculation(true);
workbook.refreshDynamicArrayFormulas(true, new CalculationOptions());
workbook.calculateFormula();
System.out.println("After calculating formulas=====2");
System.out.println(cells.get("E147").getStringValue());
System.out.println(cells.get("F147").getStringValue());
System.out.println(cells.get("G147").getStringValue());
System.out.println(cells.get("H147").getStringValue());
workbook.getSettings().getFormulaSettings().setEnableIterativeCalculation(true);
workbook.refreshDynamicArrayFormulas(true, new CalculationOptions());
workbook.calculateFormula();
System.out.println("After calculating formulas=====3");
System.out.println(cells.get("E147").getStringValue());
System.out.println(cells.get("F147").getStringValue());
System.out.println(cells.get("G147").getStringValue());
System.out.println(cells.get("H147").getStringValue());
workbook.getSettings().getFormulaSettings().setEnableIterativeCalculation(true);
workbook.refreshDynamicArrayFormulas(true, new CalculationOptions());
workbook.calculateFormula();
System.out.println("After calculating formulas=====4");
System.out.println(cells.get("E147").getStringValue());
System.out.println(cells.get("F147").getStringValue());
System.out.println(cells.get("G147").getStringValue());
System.out.println(cells.get("H147").getStringValue());
output:
70,238
72,872
73,808
78,108
After calculating formulas=====1
1,389
1,887
2,257
2,505
After calculating formulas=====2
1,389
1,887
2,257
2,505
After calculating formulas=====3
1,389
1,887
2,257
2,505
After calculating formulas=====4
1,389
1,887
2,257
2,505
We require thorough evaluation of the issue. We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): CELLSJAVA-45980
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.