Skip to main content

SQRT

Returns the square root of a number.

Syntax

expression.SQRT(arg1);

expression - A variable that represents a ApiWorksheetFunction class.

Parameters

NameRequired/OptionalData typeDefaultDescription
arg1RequiredApiRange | ApiName | numberThe number for which the square root will be returned.

Returns

number

Example

This example shows how to return the square root of a number.

// How to calculate the square root of a number.

// Use a function to get the square root of a number.

let worksheet = Api.GetActiveSheet();
let func = Api.GetWorksheetFunction();
worksheet.GetRange("A1").SetValue(func.SQRT(100));