TRY NEW VERSION

Try now New API BETA

Try out the new view and capabilities of the API documentation

START

MIN

MIN(args) → { number }

Returns the smallest number in a set of values. Ignores logical values and text.

Parameters:

Name Type Description
args number | string | array | ApiRange

Up to 255 numeric values for which the smallest number will be returned. The first argument is required, subsequent arguments are optional.

Returns:

Type
number

Example

Copy code
builder.CreateFile("xlsx")

const oWorksheet = Api.GetActiveSheet();
var oFunction = Api.GetWorksheetFunction();
var min = oFunction.MIN(123, 197, 46, 345, 67, 456);
oWorksheet.GetRange("C1").SetValue(min);

builder.SaveFile("xlsx", "MIN.xlsx");
builder.CloseFile();

Resulting document