Returns the quartile of a data set, based on percentile values from 0..1, inclusive.
Name | Type | Description |
arg1 | Array.<number> | ApiRange | The array or cell range of numeric values for which the quartile value will be returned. |
arg2 | number | The quartile value to return: minimum value = 0; 1st quartile = 1; median value = 2; 3rd quartile = 3; maximum value = 4. |
builder.CreateFile("xlsx"); const oWorksheet = Api.GetActiveSheet(); var valueArr1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]; var quart = 1; // Place the numbers in cells for (var i = 0; i < valueArr1.length; i++) { oWorksheet.GetRange("A" + (i + 1)).SetValue(valueArr1[i]); } //method params var array = oWorksheet.GetRange("A1:A12"); var oFunction = Api.GetWorksheetFunction(); var ans = oFunction.QUARTILE_INC(array, quart); //0...1 inclusive oWorksheet.GetRange("C1").SetValue(ans); builder.SaveFile("xlsx", "QUARTILE_INC.xlsx"); builder.CloseFile();