1
votes

I have built an Excel Addin using Excel JS API. The addin generates a custom function, so I have followed the instructions provided here so that I can create the required shared runtime environment. Now I would like to add a button on the Ribbon of xsi:type="ExecuteFunction"

I know that in general I have to specify the FunctionFile resource to point to commands.html and there (command.js)implement my function which will actually just open a link on a browser. It will be a help/manual button. But the configuration suggests that we should update FunctionFile resid to point to functions.html instead of commands.html. I have tried to make it this way but it does not work on Excel Desktop App. It only works on Excel Online.

Is there a workaround for this, so that I can keep my working custom function and trigger a function/command from a ribbon button?

2

2 Answers

0
votes

Limitations of shared javascript runtime

Excel custom functions are currently not supported on iPad or in one-time purchase versions of Office 2019 or earlier.

0
votes

I resolved my issue:

  1. I followed this workaround to make sure that my custom function works in a shared runtime environment

  2. I have updated manifest button's xsi type to xsi:type="ExecuteFunction"

  3. I modified commands.js file and added my function there (the one referenced by the manifest in previous step)

  4. In my taskpane.html file, I referenced the command.js file apart form functions.js

    <script type="text/javascript" src="taskpane.js"></script>
    <script type="text/javascript" src="functions.js"></script>
    <script type="text/javascript" src="commands.js"></script>