2

In the "Custom Functions' section of the Excel API documentation, there is a subsection for "UI-less custom functions". However, while they talk about authentication issues, how to debug, and runtime differences, they never explicitly state how to create such a project. How is this done?

Just for the sake of clarity, I'm hoping to create an Excel add-in that provides a few custom functions but does not have a taskpane and thus (hopefully) does not require a web server to serve the corresponding html to end users. Is this within the scope of a UI-less custom function?

1 Answer 1

1

Custom Functions require 2 additional files regardless of any UI features (taskpane, ribbon, etc.). Those are:

  1. The Metadata (JSON) file. Defines the function signatures.
  2. Either the Script (JS) file or the Page (HTML) file. Contains the function implementations. If you have a default Runtime, Script will be used. If you have a Shared Runtime, Page will be used.

So, you will have to serve 2 additional files. Luckily, those files are static and could be served from any public location like OneDrive or GitHub.

To make your add-in, UI-less, just don't include any UI definitions for taskpane, tabs, menus, etc. in the manifest. There isn't anything special.

Sign up to request clarification or add additional context in comments.

2 Comments

By the "script" file, are you referring to the file found at ./dist/functions.js which is generated from ./src/functions/functions.js when running npm run build, correct? Also, do you know of any tools similar to Yeoman which would allow me to generate a manifest which would have the bare minimum information to be used in my UI-less custom function add-in?
I am not an expert on the tools - I am a Runtime guy. However, I am sure support for custom functions is included in the Office add-ins tools. In the manifest, there is a "CustomFunctions" extension point that has a <Metadata> and a <Script> (or a <Page>) element. You can use this manifest as an example - github.com/OfficeDev/custom-functions/blob/master/addins/…. Put it on a file share, and you can install it from there. No tools are needed. It does contain a task pane an 2 buttons. You can remove the entire <DesktopFormFactor> element, if you don't want them.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.