custom-functions-runtime package
Classes
CustomFunctions.Error |
Use this class to handle errors and write custom error messages. |
Interfaces
CustomFunctions.CancelableInvocation |
Provides information about the invocation of a cancelable custom function. A cancelable custom function can provide a handler for the onCanceled event. To indicate that a function is cancelable, in the metadata JSON file, the function options should specify: If the metadata JSON file is being generated from JSDoc comments, include the tag |
CustomFunctions.Invocation |
Provides information about the invocation of a custom function. |
CustomFunctions.StreamingInvocation |
Provides information about the invocation of a streaming custom function. A streaming custom function can provide results which can change over time. Call |
Enums
CustomFunctions.ErrorCode |
Error codes for custom functions. The error codes will appear in the cell that invoked the function. Custom error messages appear in addition to these error codes. Custom messages display in the error indicator menu, which is accessed by hovering over the error flag on each cell with an error. |
Functions
Custom |
Associates the JavaScript function to the name given by the "id" property in the metadata JSON file. |
Custom |
Associates the JavaScript functions to the names given by the "id" properties in the metadata JSON file. |
Function Details
CustomFunctions.associate(id, functionObject)
Associates the JavaScript function to the name given by the "id" property in the metadata JSON file.
export function associate(id: string, functionObject: Function): void;
Parameters
- id
-
string
- functionObject
-
Function
Returns
void
CustomFunctions.associate(mappings)
Associates the JavaScript functions to the names given by the "id" properties in the metadata JSON file.
export function associate(mappings: { [key: string]: Function }): void;
Parameters
- mappings
-
{ [key: string]: Function }
Returns
void
Office Add-ins