Bug 53950 - setForceFormulaRecalculation does not force formula recalcuation in xlsx documents created with Excel 2010
Summary: setForceFormulaRecalculation does not force formula recalcuation in xlsx docu...
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: XSSF (show other bugs)
Version: 3.8-FINAL
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-01 14:25 UTC by Martin Studer
Modified: 2012-10-04 13:30 UTC (History)
0 users



Attachments
xlsx document for reproducing issue (6.96 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2012-10-01 14:25 UTC, Martin Studer
Details

Note You need to log in before you can comment on or make changes to this bug.
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