-
-
Notifications
You must be signed in to change notification settings - Fork 40
setRecalculateFormulasOnNextOpen
Julian Halliwell edited this page Apr 16, 2025
·
6 revisions
Set a flag to force all formulas to be recalculated the next time the spreadsheet file is opened (in Excel etc).
setRecalculateFormulasOnNextOpen( workbook[, value ] )
-
workbookspreadsheet object
-
valueboolean default=true -
sheetNamestring: if specified, only formulas in that sheet will be flagged for recalculation
Chainable? Yes.
Recalculating formulas can take time so deferring the operation aviods additional processing. However, if you need to recalculate formulas immediately, use recalculateAllFormulas.
getRecalculateFormulasOnNextOpen, recalculateAllFormulas, setReturnCachedFormulaValues
spreadsheet = New spreadsheet();
workbook = spreadsheet.new();
spreadsheet.setCellValue( workbook , "72", 3, 4 ); /* set value of cell */
spreadsheet.setRecalculateFormulasOnNextOpen( workbook , true );
Spreadsheets generally cache the results of formulas for performance reasons. If you use the library to modify cell values referenced by formulas, the results may therefore not change.
Setting this flag after making changes will ensure that any formulas are recalculated by Excel (or equivalent) the next time the spreadsheet is opened.