Returns the number of permutations for a given number of objects (with repetitions) that can be selected from the total objects.
Name | Type | Description |
arg1 | number | The total number of objects. |
arg2 | number | The number of objects in each permutation. |
builder.CreateFile("xlsx"); const oWorksheet = Api.GetActiveSheet(); //method params var number = 32; var number_chosen = 2; oWorksheet.GetRange("A1").SetValue(number); oWorksheet.GetRange("B1").SetValue(number_chosen); var oFunction = Api.GetWorksheetFunction(); var ans = oFunction.PERMUTATIONA(number, number_chosen); oWorksheet.GetRange("C1").SetValue(ans); builder.SaveFile("xlsx", "PERMUTATIONA.xlsx"); builder.CloseFile();