Excel 2007 VSTO 加载项即使成功安装后也不可见

发布于 11-09 22:17 字数 473 浏览 4 评论 0原文

我对 excel 2007 插件行为有点困惑。任何想法都受到高度赞赏。 这是我按时间顺序正在做的事情。

  1. 我有一个 excel 2007 VSTO 插件,它构建和调试文件,因此我将其发布到一个文件夹,
  2. 我转到该文件夹​​并运行安装插件的安装程序。下次当我打开 Excel 时,插件是可见的。到目前为止很完美!
  3. 然后我转到 Excel Office 按钮 --> Excel 选项 --> 插件 -->管理--> COM插件 并删除我刚刚安装的插件。这使得该插件远离我的 Excel 功能区。到目前为止,正如预期的那样!

但此时我的插件已安装,并且仅从活动插件列表中删除。正确的 ?如果正确,我该如何重新添加它,因为我在非活动插件列表中看不到它。我恢复它的唯一方法是将其从“添加/删除程序”中删除,然后重新安装并重新启动 Excel。

这是唯一的方法还是我可以以某种方式重新添加插件,因为它已经安装了。

I am bit confused with the excel 2007 addin behaviour. Any ideas is highly appreciated.
Here is what I am doing in chronological order.

  1. I have a excel 2007 VSTO addin and it build and debugs file so I Publish it to a folder
  2. I go to the folder and run the Setup which installs the addin . Next time when I open excel the addin is visiable. So far perfect !!
  3. Then I go to Excel Office button -->Excel Options -->Addins --> Manage --> COM Addins
    and remove the addin that I just installed. This makes the addin go away from my excel ribbon. So far as expected !!

But at this point my addin is installed and is only removed from the list of active addins. Correct ? If it is correct how do I re-add it , because I cannot see it in list of inactive addins. The only way I get it back is to remove it from Add/Remove Programs and reinstall and restart excel.

Is this is only way or I can re-add the addin somehow since it is already installed.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

开始看清了2024-11-16 22:17:50

据我所知,这是 VSTO 的问题。对于普通的 COM 插件,您可以打开 Com Addin 窗口,单击 ADD 按钮并选择您的插件的 dll。

但对于 VSTO,这不起作用,因为 VSTO dll 不是非常“正常”的 COM dll。对于 VSTO,您必须将 Excel 指向 .VSTO 文件,但您无法从 Excel 本身内部执行此操作,只有安装程序才能实现这一点。

As far as I know, that's a problem with VSTO. With normal COM addins, you can open the Com Addin window, click the ADD button and select your addin's dll.

But with VSTO, that doesn't work, since VSTO dll's are not quite "normal" COM dlls. For VSTO, you have to point Excel at the .VSTO file, but you can't do that from within Excel itself, only an installer can make that happen.

享受孤独2024-11-16 22:17:50

插件的加载是通过注册表项控制的。VSTO

插件的不同之处在于它们不直接作为 dll 加载,而是通过某种加载器加载。所有 vsto 插件的加载程序都是相同的,并且知道要通过清单(.vsto 文件)加载哪个程序集。

在不重新安装的情况下将插件放回到列表中需要您恢复它的注册表项
如果导出将您的插件的注册表添加到 .reg 文件中,稍后只需双击 reg 文件即可重新启用它。
可以在此处找到所需的密钥: http://msdn.microsoft.com/en -us/library/ff937654.aspx)(搜索清单)

Loading of addins are controlled through registry keys

VSTO addins are different in the sense that they don't load directly as a dll but through some sort of loader. The loader is the same for all vsto addins and knows what assembly to load through a manifest (the .vsto file)

Getting the add-in back in the list without reinstalling requires you to restore the registry entry for it
If you export the registry hyve for your addin to a .reg file you can reenable it later by simply double clicking the reg file.
The required keys can be found here: http://msdn.microsoft.com/en-us/library/ff937654.aspx) (Search for manifest)

高冷爸爸2024-11-16 22:17:50

我认为上面的答案太复杂了:


  1. 答案:

    • 您可以通过在 Windows 中卸载插件来重新启用该插件
    • 之后,双击 vsto 文件重新安装(请注意,如果您有包含引导程序的“真实”设置,则必须通过执行“setup.exe”进行安装)

  1. 答案:我认为这就是您想要做的:

    • 如果您只想停用 Excel 中的加载项,请不要在“COM 加载项”对话框中“删除”。
    • 只需在列表中取消选中您的加载项,它就会被停用。
    • 然后,您可以通过再次在列表中检查它来重新激活它。

问候,约尔格

I think the answer above is too complicated:


  1. Answer:

    • You can re-enable your Add-In by deinstalling it in Windows
    • After that, double-click the vsto file to re-install it (note that if you have a "real" setup includinf a bootstrapper, you have to install by executing "setup.exe")

  1. Answer: I think that was what you wanted to do:

    • If you just want to deactivate your Add-In in in Excel, do not "Remove" in the "COM Add-Ins" dialog.
    • Just uncheck your Add-In in the list and it will be deactivated.
    • You can then re-activate it by checking it in the list again.

Regards, Jörg

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文