Bug 53950

Summary: setForceFormulaRecalculation does not force formula recalcuation in xlsx documents created with Excel 2010
Product: POI Reporter: Martin Studer <martin.studer>
Component: XSSFAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 3.8-FINAL   
Target Milestone: ---   
Hardware: PC   
OS: All   
Attachments: xlsx document for reproducing issue

Description Martin Studer 2012-10-01 14:25:53 UTC
Created attachment 29430 [details]
xlsx document for reproducing issue

The attached xlsx document has been created with Excel 2010. Using the following code to force formula recalculation does not work, i.e. when the document is opened the formula value is not updated:

Workbook wb = WorkbookFactory.create(new File("recalc2.xlsx"));
wb.getSheet("Sheet1").setForceFormulaRecalculation(true);
wb.write(new FileOutputStream("out.xlsx"));

setForceFormulaRecalculation seems to work ok with xlsx documents created in Excel 2007.
Comment 1 Yegor Kozlov 2012-10-04 13:30:52 UTC
Should be fixed in r1394059

setForceFormulaRecalculation didn't work because it conflicted with calculation settings in workbook.xml. If workbook-level setting is"manual" then Excel does not recalculate formulas, no matter if formulaRecalculation=true in the sheet.

Please try with the latest build from trunk.

Yegor