更新清单XML后强制excel刷新命令功能区(用于Office加载项) [英] Force excel to refresh command ribbon (for office add-in) after updating manifest XML

查看:76
本文介绍了更新清单XML后强制excel刷新命令功能区(用于Office加载项)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用office.js和位于共享驱动器上的XML清单来加载Office加载项.加载加载项后,这会使用几个自定义命令图标向Excel添加一个新功能区.

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.

但是,在编辑manifest.XML文件后,说我从功能区中注释了一个命令图标,但我还没有弄清楚如何强制刷新Excel功能区以反映我的更改.

我已经尝试,重新加载加载项,重新添加,重新启动excel,在保存时更新清单版本,在保存时更改清单ID/GUID等,但仍然没有能够找到一种在进行更改后立即持续更新功能区的方法.它似乎只是加载清单文件的缓存版本.有什么想法吗?

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?

我正在使用Excel 2016的Windows 10.

I'm on Windows 10 using Excel 2016.

推荐答案

我发现不是功能区在缓存旧的图标,实际上是Office加载项窗口在缓存旧的清单文件.

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.

这篇关于更新清单XML后强制excel刷新命令功能区(用于Office加载项)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆