1
votes

I created an Excel custom function as a Microsoft 365 add-in, following the example in the documentation: https://docs.microsoft.com/en-us/office/dev/add-ins/quickstarts/excel-custom-functions-quickstart?tabs=excel-windows, and ran it from powershell using the instruction npm run start:desktop to test it in the desktop version of Excel. It failed to run, perhaps because my copy of Excel was Office 2019-based, not Office 365. However, unlike an xlm add-in, I cannot now delete it from Excel. I have removed the code completely from my desktop; but the functions themselves (CONTOSO.ADD() and three others in the CONTOSO namespace) still autosuggest when I start writing a formula beginning with CON, and the add-in still shows up in the add-in list (File>Options>Add-Ins and select Excel Add-ins>Go in the dialogue). However of course, the add-in does not work and the functions simply return an error. The taskpane pops up and records the error 'This add-in is no longer available: add-ins inserted during development are only available during debugging from Visual Studio. Please open your project in Visual Studio and re-run your application, or deploy your add-in into a valid catalog and insert.'

I want to return to the base state by simply deleting the add-in altogether.

With the old-style .xlam add-ins, once the code for the add-in is removed, Excel notices and suggests deleting the add-in. But in this case, the code persists as a 'ghost'.

How can I simply remove it?

15/12/2020:15:50: I cannot simply overwrite it. I installed Microsoft Office 365 and ran the whole project again, recreating the UDFs and the taskpane. Excel (desktop) now reports that it cannot load the add-in because a function of that name already exists.

So the learning project as per the documentation is at a dead end, though I could always proceed by changing the namespace, which I will try next.

1

1 Answers

1
votes

Update (solved) - hope it is useful to others encountering this puzzling (for newbies) behaviour.

This worked: https://docs.microsoft.com/en-us/office/dev/add-ins/testing/clear-cache#clear-the-office-cache-on-windows

Suggested in the following thread: https://github.com/OfficeDev/Excel-Custom-Functions/issues/104