Microsoft.Office.Interop.Excel Reference Cannot be found

后端 未结 4 1503
猫巷女王i
猫巷女王i 2021-02-18 19:07

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

The project is detecting the Microsoft.Office.Interop

相关标签:
4条回答
  • 2021-02-18 19:12

    If you don't have excel installed, run this command in the nuget-packet-manager-console:

    Install-Package Microsoft.Office.Interop.Excel
    
    0 讨论(0)
  • 2021-02-18 19:18

    I installed Microsoft office PIAs, but I had the same problem, cannot find microsoft.office.interop.excel dll, I also I installed Visual Studio 2010 Tools for the Office System 4.0 Runtime Service Pack 1 but still the problem persist.

    Finally I resolve the problem with an add of Office / SharePoint development package to my Visual Studio 2017 installation:

    Go to Tools > Get Tools and Features ..

    And then check Office / sharepoint development and modify your installation.

    0 讨论(0)
  • 2021-02-18 19:23

    As described in http://social.msdn.microsoft.com/Forums/vstudio/en-US/c9e83756-4ae2-4ed4-b154-1537f3bb3a22/cant-find-microsoftofficeinteropexceldll?forum=netfxsetup

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

    • 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”.

    0 讨论(0)
  • 2021-02-18 19:32

    I installed MS Office 13 and from then on I started getting this error in VS 2012 project. I tried adding the MS Office lib via COM control but that didnt work. Finally I had to add this library references from the "Extensions" section (not not under COM); had to select Microsoft.Office.Interop.Excel, version 15.0.0.0. That fixed the error.

    Hope that helps some.

    0 讨论(0)
提交回复
热议问题