Returns the average (arithmetic mean) of the specified arguments.
Name | Type | Description |
args | number | string | Array.<number> | Up to 255 numeric values for which the average value will be returned. The first argument is required, subsequent arguments are optional. Arguments can be numbers or names, arrays or references that contain numbers. |
builder.CreateFile("xlsx"); var oWorksheet = Api.GetActiveSheet(); var oFunction = Api.GetWorksheetFunction(); var ans = oFunction.AVERAGE(123, 197, 46, 345, 67, 456); oWorksheet.GetRange("B2").SetValue(ans); builder.SaveFile("xlsx", "AVERAGE.xlsx"); builder.CloseFile();