C#Excel加载项未在Excel 2000中加载 [英] C# Excel Addin not Loading in Excel 2000

查看:118
本文介绍了C#Excel加载项未在Excel 2000中加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的朋友,

我正在使用VS 2005 for Excel创建共享加载项. (文件->新项目->其他项目-可扩展性->共享加载项.
我的系统中同时安装了Excel 2007和Excel 2002(Office XP),该插件在excel版本中均可正常使用.

当我在其他系统中安装外接程序安装程序时,外接程序未加载.

Dear Friends,

I am creating a Shared Addin Using VS 2005 for Excel. (File --> New Project --> Other Projects -- Extensibility --> Shared Addin.
I am having both Excel 2007 and Excel 2002(Office XP) installed in my system, the Addin works fine with both the excel version.

When I install the Addin setup in some other sytem the addin is not loading.
How to deploy the addin for all the Excel Versions?

推荐答案

确保要在项目中引用要允许的所有Excel版本.

然后尝试从该Excel的最新版本的引用开始加载该加载项,如果该引用不存在(您会在生成错误时知道它.),然后在列表上继续前进.

问候.

更新:
来自微软. "Microsoft不鼓励在Office 2000或Office XP中使用托管代码.当您尝试将托管代码引入这些Office版本时要小心.这些Office版本是在创建.NET Framework之前进行设计和测试的." ( http://support.microsoft.com/kb/948461 [
Assure that all the versions of Excel you intend to allow are being referenced in the project.

Then attempt to load the addin starting with the reference to newest version of Excel, if that reference is not there (You''ll know when it generates an error.) then move on down the list.

Regards.

Update:
From Microsoft. "Microsoft discourages using managed code in Office 2000 or in Office XP. Be careful when you try to introduce managed code into these Office versions. These Office versions were designed and tested before the .NET Framework was created." (http://support.microsoft.com/kb/948461[^])

So the short answer is, no. C# addins will not work in Excel 2000.

There are work-arounds and it seems there are number of forums that discuss this very problem but it seems to be a lot of effort to support the older versions.


您将需要添加 GAC CAS中的安装文件夹,并且完全信任部署计算机.默认情况下,开发计算机为您的外接程序设置权限以使其与Office应用程序一起运行,但是在部署时,您必须显式地对其进行权限.

这是对外接程序进行故障排除的有用链接:
http://blogs.msdn. com/b/vsod/archive/2008/04/22/troubleshooting-com-add-in-load-failures.aspx [ http://msdn.microsoft.com/en-us/library/cc136646.aspx [ ^ ]

谢谢,
Hemant
you will need to add the installation folder in GAC CAS with full trust on deployment machine. The development machine by default set permission for your addin to run with Office applications but on deployment you have to explicitly it.

here is a useful link for troubleshooting addins:
http://blogs.msdn.com/b/vsod/archive/2008/04/22/troubleshooting-com-add-in-load-failures.aspx[^]

Thanks,
Hemant

My bad my fingers have their own mind i wanted to type CAS but added GAC instead.
here is an additional link that talks about Outlook addin deployment but same way you can do it for excel addin
http://msdn.microsoft.com/en-us/library/cc136646.aspx[^]

Thanks,
Hemant


这篇关于C#Excel加载项未在Excel 2000中加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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