Whatever message this page gives is out now! Go check it out!

spreadsheetGetForceFormulaRecalculation

Last update:
May 18, 2026

Description

Retrieves information whether an Excel object has formulas that are recalculated when the file opens.

Returns

Returns Boolean for the spreadsheet object where formula recalculation is set to true or false.

History

  • ColdFusion (2025 release): Added the function.

Syntax

spreadsheetGetForceFormulaRecalculation(Object spreadsheet)

Parameters 

Name 
Required 
Type 
Description 
spreadSheetObject
Yes
ExcelInfo
The Excel spreadsheet object which contains a formula or formulas to recalculate on launch.

Example

<cfscript>
    theFile=GetDirectoryFromPath(GetCurrentTemplatePath()) &"BookFormula.xlsx";
    theFile1=GetDirectoryFromPath(GetCurrentTemplatePath()) &"SpreadsheetSetPrintOrientationReadTrue.xlsx";
    // read the first xlsx file
    obj=SpreadsheetRead(#theFile#)
    // set the value 21 to row 3, col 1
    SpreadsheetSetCellValue(obj,21, 3, 1)
    // add formula on cell row 11, col 1
    SpreadsheetSetCellFormula(obj, "SUM(A1:A9)", 11, 1)
    // force formula recalculation
    SpreadsheetSetForceFormulaRecalculation(obj,true)
    value=SpreadsheetGetForceFormulaRecalculation(obj)
    writeoutput(value&"<br>")
    spreadsheetWrite(obj,#theFile1#,"", "yes", "no")
    obj=SpreadsheetRead(#theFile1#)
    theValue=SpreadsheetGetCellValue(obj,11,1);
    writeoutput(#theValue# &"<br>")
    theValue2=SpreadsheetGetCellValue(obj,14,1);
    writeoutput(#theValue2#)
</cfscript>

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page