spreadsheetSetForceFormulaRecalculation

説明

Excelシート内の1つまたは複数の数式を再計算し、シートを開いたときに数式を適用します。スプレッドシートでの式の再計算により、式が依存するデータが変更されるたびに、すべての式が更新されます。これにより、相互依存する式を持つ複雑なスプレッドシート間でデータの正確性と整合性が維持されます。

戻り値

なし 

履歴

  • ColdFusion(2025 リリース): 関数が追加されました。

構文

spreadsheetSetForceFormulaRecalculation( Object spreadsheet, Boolean forceRecalculation)

パラメーター 

名前

 

 

必須

 

 

Type

 

 

説明

 

 

spreadSheetObject 

 

 

〇 

 

 

ExcelInfo 

 

 

起動時に再計算する数式が含まれているExcel スプレッドシートオブジェクトです。 

 

forceRecalculation 

 

 

〇 

 

 

Boolean 

 

 

すべての数式を強制的に再計算するには True を指定し、それ以外の場合は false を指定します。 

 

<cfscript>
    theFile=GetDirectoryFromPath(GetCurrentTemplatePath()) &&quot;BookFormula.xlsx&quot;;
    theFile1=GetDirectoryFromPath(GetCurrentTemplatePath()) &&quot;SpreadsheetSetPrintOrientationReadTrue.xlsx&quot;;
    //最初のxlsxファイルを読み取り
    obj=SpreadsheetRead(#theFile#)
    //値21を行3の列1に設定
    SpreadsheetSetCellValue(obj,21, 3, 1)
    //セル行11、列1に数式を追加
    SpreadsheetSetCellFormula(obj, &quot;SUM(A1:A9)&quot;, 11, 1)
    //数式を強制的に再計算
    SpreadsheetSetForceFormulaRecalculation(obj,true)
    value=SpreadsheetGetForceFormulaRecalculation(obj)
    writeoutput(value&&quot;<br>&quot;)
    spreadsheetWrite(obj,#theFile1#,&quot;, &quot;yes&quot;, &quot;no&quot;)
    obj=SpreadsheetRead(#theFile1#)
    theValue=SpreadsheetGetCellValue(obj,11,1);
    writeoutput(#theValue# &&quot;<br>&quot;)
    theValue2=SpreadsheetGetCellValue(obj,14,1);
    writeoutput(#theValue2#)
</cfscript>

Adobe, Inc.

ヘルプをすばやく簡単に入手

新規ユーザーの場合