找不到Microsoft.Office.Interop.Excel参考 [英] Microsoft.Office.Interop.Excel Reference Cannot be found

查看:61
本文介绍了找不到Microsoft.Office.Interop.Excel参考的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在将excel引用添加到我的项目时遇到了麻烦.我已经安装了主要互操作程序集.

I am having troubles adding the excel reference to my project. I have already installed Primary Interop Assemblies.

该项目正在正确检测Microsoft.Office.Interop.Word程序集引用,但仍找不到excel引用.

The project is detecting the Microsoft.Office.Interop.Word assembly reference correctly but the excel reference still cannot be found.

当我尝试手动添加引用时,我右键单击该项目,添加引用,导航到Microsoft.Office.Interop.Excel文件,然后尝试手动添加它.选择引用后,请确保已选中引用,然后单击确定".什么也没发生,它实际上无法将引用路径添加到项目中.

When I try to manually add the reference, I right click the project, add reference, navigate to the Microsoft.Office.Interop.Excel file and try to add it manually. Once i select the reference I then make sure the reference is checked, then hit ok. Nothing happens, it fails to actually add the reference path to the project.

使用VS2012 Ultimate.

Using VS2012 Ultimate.

关于我可以做什么来获得该项目以查看excel参考的任何建议?

Any suggestions on what I can do to get the project to see the excel reference?

推荐答案

  • 在项目"菜单上,单击添加引用".

    • On the Project menu, click "Add Reference."

    在"COM"选项卡上,单击"Microsoft Excel对象库",然后单击选择".在Visual Studio 2012中,在"COM"选项卡上找到Microsoft Excel 14.0(或其他版本)对象库.

    On the COM tab, click Microsoft Excel Object Library, and then click Select. In Visual Studio 2012, locate Microsoft Excel 14.0 (or other version) Object Library on the COM tab.

    在添加引用"对话框中单击确定"以接受您的选择.如果系统提示您为选定的库生成包装器,请单击是".

    Click OK in the Add References dialog box to accept your selections. If you are prompted to generate wrappers for the libraries that you selected, click "Yes".

    这篇关于找不到Microsoft.Office.Interop.Excel参考的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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