跳到主要内容

PERMUT

Returns the number of permutations for a given number of objects that can be selected from the total objects.

Syntax

expression.PERMUT(arg1, arg2);

expression - A variable that represents a ApiWorksheetFunction class.

Parameters

NameRequired/OptionalData typeDefaultDescription
arg1RequiredApiRange | ApiName | numberThe total number of objects.
arg2RequiredApiRange | ApiName | numberThe number of objects in each permutation.

Returns

number

Example

let worksheet = Api.GetActiveSheet();
let func = Api.GetWorksheetFunction();
worksheet.GetRange("A1").SetValue(func.PERMUT(32, 2));