TX Sheet Control

WorkbookCalculation.recalculateAsync Method

Method

Recalculates all formulas, awaiting asynchronous dependencies until the document becomes stable.

Owner: WorkbookCalculation. Package: @txtextcontrol/tx-sheet-control-server. Version: 2.0.0.

Syntax

await owner.recalculateAsync(options)

Parameters

ParameterTypeOptionalDescription
options{ force?: boolean; } | undefinedYesSupported settings for this operation; omitted settings retain documented defaults.

Return Value

Promise<void>.

Examples

Use a fresh sample workbook for this example. In the browser pass editor.workbook; in Node.js pass the server control. Document-bound objects are obtained from that same owner.

async function applyWorkbookCalculationRecalculateAsync(control) {
    const book = control.workbook;
    const workbookCalculation = book.calculation;
    await workbookCalculation.recalculateAsync();
}

Remarks

Use this member on an object from the current document. Reacquire document-bound handles after replacement/deletion. Validate arguments against the declared types and documented bounds; handle exceptions or rejected promises.

See Also