Returns the median, or the number in the middle of the set of given numbers.
Name | Type | Description |
args | number | string | array | ApiRange | Up to 255 numeric values for which the median will be calculated. The first argument is required, subsequent arguments are optional. |
builder.CreateFile("xlsx"); const oWorksheet = Api.GetActiveSheet(); var oFunction = Api.GetWorksheetFunction(); var median = oFunction.MEDIAN(4,45,12,34,3,54,2,2); oWorksheet.GetRange("C1").SetValue(median); builder.SaveFile("xlsx", "MEDIAN.xlsx"); builder.CloseFile();