问题
I'm sideloading an office add-in using office.js and an XML manifest located on a share drive. This adds a new ribbon to excel with a few custom command icons once the add-in is loaded.
However, after editing the manifest.XML file, say I comment out a command icon from the ribbon, I have not figured out how to force a refresh of the excel ribbon to reflect my changes.
I've tried reloading the add-in, re-adding it, restarting excel, updating the manifest version when saving, changing the manifest Id/GUID when saving, etc, but still have not been able to find a way to consistently update the ribbon immediately after making changes. It seems to just be loading a cached version of my manifest file. Any ideas?
I'm on Windows 10 using Excel 2016.
回答1:
I figured out that it wasn't the ribbon that was caching old icons, it was actually the Office Add-ins window that was caching the old manifest files.
If you go to Insert -> My Add-ins -> Shared Folder there is a refresh button in the top right corner which will refresh the manifest files to their latest changes.
来源:https://stackoverflow.com/questions/43852608/force-excel-to-refresh-command-ribbon-for-office-add-in-after-updating-manifes