Bug 61864

Summary: Workbook.setForceFormulaRecalculation not working as expected
Product: POI Reporter: Luca <miaposta21_>
Component: SS CommonAssignee: POI Developers List <dev>
Status: RESOLVED WORKSFORME    
Severity: normal    
Priority: P2    
Version: 3.17-FINAL   
Target Milestone: ---   
Hardware: PC   
OS: All   
Bug Depends on: 61700    
Bug Blocks:    
Attachments: JUnit test class.
Excel empty file

Description Luca 2017-12-06 11:54:26 UTC
Workbook.setForceFormulaRecalculation always sets ForceFormulaRecalculation at false. Create and excel file, open a workbook on it and run the followng lines:

System.out.println(wb.getForceFormulaRecalculation());
wb.setForceFormulaRecalculation(true);
System.out.println(wb.getForceFormulaRecalculation());
wb.setForceFormulaRecalculation(false);
System.out.println(wb.getForceFormulaRecalculation()); 

First output will depend on file settings, other two outputs will be both false.
Comment 1 Luca 2017-12-11 08:50:39 UTC
Created attachment 35601 [details]
JUnit test class.

Add JUnit test class.
Comment 2 Luca 2017-12-11 14:26:00 UTC
Created attachment 35604 [details]
Excel empty file

test.xlsx is an excel file created anew with Microsoft Excel. I attach it here for convenience.
Comment 3 Dominik Stadler 2020-03-28 09:58:15 UTC
This does work for me on latest version 4.1.2, please try with this version and let us know if it still does not work for you.