TRY NEW VERSION

Try now New API BETA

Try out the new view and capabilities of the API documentation

START

GCD

GCD() → { number | string | boolean }

Returns the greatest common divisor.

Parameters:

This method doesn't have any parameters.

Returns:

Type
number | string | boolean

Example

Copy code
builder.CreateFile("xlsx");
var oWorksheet = Api.GetActiveSheet();
var oFunction = Api.GetWorksheetFunction();
oWorksheet.GetRange("A1").SetValue(oFunction.GCD(28, 16, 878, 800, 1650, 2000));
builder.SaveFile("xlsx", "GCD.xlsx");
builder.CloseFile();

Resulting document