ISFORMULA

function ISFORMULA(arg1: ApiRange = null): number | string | boolean

Description

Checks whether a reference is to a cell containing a formula, and returns TRUE or FALSE.

Parameters

arg1ApiRangedefault: null

Is a reference to the cell you want to test. Reference can be a cell reference, a formula, or name that refers to a cell.

Returns

number | string | boolean

Try It


const oWorksheet = Api.GetActiveSheet();

// Set the formula in cell B3
oWorksheet.GetRange("B3").SetValue("=SUM(5, 6)");

// Check if there is a formula in C3
var oFunction = Api.GetWorksheetFunction();
var result = oFunction.ISFORMULA(oWorksheet.GetRange("B3"));
oWorksheet.GetRange("C3").SetValue(result);

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).