Search code examples
exceltypescriptoffice-jscustom-functions-excel

Reloading Custom Functions in Excel Add-In - Online Version


I am working on an Excel Add-In with custom functions using the Javascript API. I have followed this tutorial.

I am trying to debug this using the Web version of Excel as the logging capabilities are significantly better, however I am finding that it will never register changes in my functions.ts file. I can change any other code file (eg. taskpane.ts) and will see the changes reflected immediately, however whenever I try to reload the custom functions, I do not see any of the changes.

The commands I'm using: npm run build followed by npm run watch in one terminal, npm run start:web in another.

This is the same whether or not I run npm run watch in one terminal or not.

In order to observe any changes I need to completely restart the entire server and reload the plugin.

This makes for a pretty miserable development experience. Has anyone overcome issues like these, or have suggestions as to how I can improve the development process for Excel add-ins?

I would also like to develop using the Desktop version of excel, however do to the lack of decent logging capabilities, this doesn't seem too feasible.


Solution

  • Sorry to hear you are having problems. Can you please try the following:

    • Open the project manifest and remove 'dist' from the functions.html url as follows:

    enter image description here

    • Run "npm run build" again and then "npm start" again