C # The referenced Excel file cannot find the type or namespace name "Excel" (is the using instruction or assembly reference missing ?)

Source: Internet
Author: User
The Excel reference problem occurs in the project. One project has referenced Excel Object 11.0, which works well.
However, when you want to reference excel in another project, you cannot use the Excel namespace and the prompt "cannot find the type or namespace name" Excel "(whether the using command or ProgramSet Reference ?) ".
Of course, some colleagues have said this method by downloading a patch on the following websites and installing it, but even though I have installed it several times, it cannot solve my problem. Finally, I went to the Microsoft. office space and found an Excel file under. InterOP. So I added using Excel = Microsoft. Office. InterOP. Excel to the class. The problem was solved now!
Appendix: Microsoft patches.
Http://www.microsoft.com/downloads/thankyou.aspx? Familyid = 3c9a983a-ac14-4125-8ba0-d36d67e0f4ad & displaylang = en

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.