在excel自动化中添加图片,错误! [英] Add Picture in excel automation, Error!

查看:148
本文介绍了在excel自动化中添加图片,错误!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



Hi,

Error 1
Reference required to assembly 'office, Version=12.0.0.0, Culture=neutral,  PublicKeyToken=71e9bce111e9429c' containing the type 'Microsoft.Office.Core.MsoTriState'. Add one to your project.
In my Reference, I add Microsoft Office Object Library Ver.12.


我还发现我使用的这台PC包含Excel版本Excel2002?和Excel2003.

但是,我已经在参考资料中声明了我正在使用的版本.我可能监督了这个问题.请帮助我.


As I also found out that this PC i''m using contains to Excel Version, Excel2002? and the Excel2003.

But, i''ve declared in my reference, the version i''m using. I probably overseeing the problem. Pls help me.

推荐答案

您需要在项目中引用的程序集名称为office.dll. Microsoft.Office.Core是程序集中名称空间的名称.

您确定您的项目实际上有对office.dll程序集的引用吗? (如果您在解决方案资源管理器中单击显示所有文件",则引用"节点是否包含"Office"的条目?).

如果您确实已经引用了office.dll程序集,请确保引用的是12.0.0.0版本(Office 2007),而不是11.0.0.0(Office 2003)或其他版本.
The assembly name you need to reference in your project is office.dll. Microsoft.Office.Core is the name of the namespace in the assembly.

Are you sure that your project actually has a reference to the office.dll assembly? (if you click "Show All Files" in Solution Explorer, does the References node include entry for "Office"?).

If you do already have a reference to the office.dll assembly, make sure you are referencing the 12.0.0.0 version (Office 2007), not 11.0.0.0 (Office 2003) or some other version.


这篇关于在excel自动化中添加图片,错误!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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