`XSSFWorkbook.SetForceFormulaRecalculation` will not force recalc on open Excel book
See original GitHub issueI want to generate invoice xlsx using NPOI. The invoice is not fully built by NPOI. I use a hand made xlsx as a template. Because it assumes that book is modified by software, there is sheet to hold variables. The variables are just cells having names.
The issue is that in this way I need to use XSSFWorkbook.SetForceFormulaRecalculation = true;
But this doesn’t work as expected.
I’ll post simple xlsx files for this repro:
Base.xlsx SetNameTaro-With-fullCalcOnLoad.xlsx SetNameTaro-Without-fullCalcOnLoad.xlsx
If fullCalcOnLoad = true
is activated around:
XSSFWorkbook.SetForceFormulaRecalculation
will work as expected.
So I want to ask to add fullCalcOnLoad = value
line to the NPOI.
Issue Analytics
- State:
- Created 2 months ago
- Comments:15 (6 by maintainers)
Top Results From Across the Web
Apache POI does not update formulas
Workbook.setForceFormulaRecalculation explicitly only forces the recalculation process to Excel while next time opening the workbook.
Read more >How to force Excel to recalculate on opening xlsx
setForceFormulaRecalculation () is available to force Excel to recalculate on opening xls file. But XSSFSheet does not seem to have the same method....
Read more >53950 – setForceFormulaRecalculation does not force ...
Bug 53950 - setForceFormulaRecalculation does not force formula recalcuation in xlsx documents created with Excel 2010.
Read more >org.apache.poi.xssf.usermodel.XSSFSheet. ...
Control if Excel should be asked to recalculate all formulas on this sheet when the workbook is opened. Calculating the formula values with...
Read more >Excel auto-recalculate stops working across sheets when ...
I have an Excel workbook with many sheets to track orders and inventory ... Hitting just the recalc button does not force the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I don’t know why, but the occurrence of this problem is probabilistic. Not 100%. Around 30% ~ 50%?
https://github.com/nissl-lab/npoi/assets/5955540/3e275fe0-efab-41ac-9445-dc989da90260
I have decided to post a suggest
fullCalcOnLoad = value
, as I have found the following information at stackoverflow.openxml - Set xlsx to recalculate formulae on open - Stack Overflow
However it is your discretion to use it or not.