Recalculate worksheet values

Description

Repeatedly recalculates worksheet cell values within one-second intervals.

(function ()
{
    let timerId = setInterval(function(){
        Api.asc_calculate(Asc.c_oAscCalculateType.All);
        var oWorksheet = Api.GetActiveSheet();
        oWorksheet.GetRange("F2").SetValue("Average");
        oWorksheet.GetRange("G2").SetValue("=AVERAGE(B2:B80)");
    }, 1000);
})();

Methods used: GetActiveSheet, GetRange, SetValue

Result

Recalculate worksheet values

Get Help

  • If you have any questions about ONLYOFFICE Docs, try the FAQ section first.
  • You can request a feature or report a bug by posting an issue on GitHub.
  • You can also ask our developers on ONLYOFFICE forum (registration required).