OptionalbehaviorAdditional metadata about the function's behavior or requirements.
OptionalcontextDescribes the execution context required by the function.
Contexts fall into two categories:
Macro contexts: Used by macro-style functions to access parts of the document or selection:
'Workbook': The entire workbook'Sheet': A single sheet'Range': A selected sheet range'Ranges': Multiple selected rangesCalculation context: Used by formula functions like OFFSET or INDIRECT
that need access to evaluation position or sheet metadata during calculation.
This context is available in headless or worker environments.
execute.IFunction.Calculation then the function must return a value.IFunction.Calculation then the function must return void or a cleanup function.OptionalmaxThe largest number of arguments a call may carry, from Repeating<T, Max> on the variadic
parameter. Omitted at the default of 255.
Excel keeps one such number per NAME and compares it against the whole call's argument
count in its front end, so a call past it is refused AT ENTRY rather than answered — which
is why the cap lives on the declaration and not in a body. It is not derivable from the
shape: STDEV takes 255 arguments and STDEV.S, the same function under its dotted name,
takes 254.
Named of the actual function in code.
The unique identifier for the function. It has a number of rules:
OptionalparametersAn array of Parameter objects describing the function's parameters.
OptionalreturnMetadata describing the type and dimensionality of the return value.
Contains metadata about a function declaration, including its name, return type, parameters, and additional documentation.