TRY NEW VERSION

Try now New API BETA

Try out the new view and capabilities of the API documentation

START

LCM

LCM() → { number | string | boolean }

Returns the least common multiple.

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.LCM(4, 6, 8, 8, 12, 24, 2, 1));
builder.SaveFile("xlsx", "LCM.xlsx");
builder.CloseFile();

Resulting document