The namespace "Microsoft Office" does not contain a type or the namespace name "InterOP"

Source: Internet
Author: User
In C # C/S ProgramTo export data to an Excel file, you need to add references. In this case, you need to select support when installing the office. net. however, even if this option is selected during installation, the following error occurs: "The namespace" Microsoft Office "does not have a type or the namespace name is" InterOP "."
I have already installed Office 2003 several times and chose to support. Net during installation, but an error is returned.
Later, you can install the default options of Office 2007. It turns out to be so simple.
Solution:
1. Install the Office 2007
2 Add reference --- COM components: Microsoft Office 12.0 Object Library and Microsoft Excel 12.0 Object Library
This should work.

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.