.NET Framework Bookmark and Share   
 index > .NET Framework Setup > Can't find Microsoft.Office.Interop.Excel.dll
 

Can't find Microsoft.Office.Interop.Excel.dll

I am trying to use this namespace and downloaded the O2003pia.exe from http://support.microsoft.com/kb/897646.

I ran the msi and see the Interop files in the GAC but when I try to 'Add a Reference' in VS2005, I do not see any of the Interop namespaces.

I already had Office 2003 installed before I ran the above msi.

What else am I doing wrong. Why aren't these included with VS2005 in the first place..............

Please help,

JJM

JJJMonty

Hi JJJMonty,

Actually, if you want to use this DLL, following these steps:

1. On the Project menu, click Add Reference.

2. On the COM tab, locate Microsoft Excel Object Library, and then click Select. In Visual Studio 2005, locate Microsoft Excel 11.0 Object Library on the COM tab.

3. 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�

Then you should be able to use this interop DLL, for more details, please visit Primary Interop Assemblies.

Hope this helps!

Thanks!

Feng Chen

Hi JJJMonty,

Actually, if you want to use this DLL, following these steps:

1. On the Project menu, click Add Reference.

2. On the COM tab, locate Microsoft Excel Object Library, and then click Select. In Visual Studio 2005, locate Microsoft Excel 11.0 Object Library on the COM tab.

3. 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�

Then you should be able to use this interop DLL, for more details, please visit Primary Interop Assemblies.

Hope this helps!

Thanks!

Feng Chen

Hi Feng Chen,

I m also facing the same problem, i have already added the microsoft.excel 11.0 reference then also it is not identifying the Microsoft.Office.Interop.Excel namespace.It is giving Microsoft.Office.core but not Microsoft.Office.Interop.Excel namespace.What should I do?

Plz help.

Fozia Izhar

By adding microsoft.excelreference in VS2005, You will find Interop.Excel & Microsoft.Office.coreinstead of Microsoft.Office.Interop.Excel.

Ashley Prius
I have a code that uses Microsoft.Office.Interop.Excel. I am using VS2005 and Office XP. When I added the reference to Microsoft Excel Object Library 10.0, it added Excel in the references but still I am not able to add this line on top of my code:

using Microsoft.Office.Interop.Excel;

When I press dot (.) after Microsoft.Office it just displays Core option. Why?
RPKJBP

yaa that was the problem with me also.

until or unless we add Microsoft.Office.Interop.excel dll explicitely from reference it doesn't show that option.

And this reference is available only with licensed version.It means when we hav licensed version for both .net and Microsoft office.

Fozia Izhar

Hi

Try

the following

using Excel = Microsoft.Office.Interop.Excel;

and use Excel

it's working for me

good luck

MichaelUSA

If you have to install the new Interop package from Microsoft, make sure you exit Visual Studio and re-open your project. This should help. It took me a couple of hours to figure this one out.

lochmant
Amazing...I was having the same issue, no matter what i referenced, I could not get the excel object on the page.
I have never seen this being used "Imports Excel = Microsoft.office.interop.excel". Can someone explain why this works.
  • Edited byRobiSingh Thursday, November 13, 2008 2:08 PM
  •  
  • Thursday, August 13, 2009 4:59 PMVickyJicky Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    My Easy Solution:

    1. Download and install pre op assemblies files from the microsoft site: 'OFFICE XP PIAs'

    2. I unzipped and save all files to a directory Ain my local machine.

    3. There will be a file called register.bat in the directory A. simply double click that file.. register entries will automatically happen

    4. After unzipping the contents, i copied all the files from that directory 'A' to C:\Program Files\Microsoft.Net\Primary Interop Assemblies\ (you can overwrite the existing files .. no prob)

    5. In your visual studio IDE, click Add Reference.. go to tab '.NET'. Locate and click select 'Micrsoft Office Interop Excel'.

    6. Now you can use in your code ..Imports Excel = Microsoft.Office.Interop.Excel

    Please tell if me if is worked. It worked for me!

  • RobiSingh

    I have done what you have told above but I cannot add a reference into Visual Studio IDE. I have copied all the files in the required location but still cannot use Microsoft.Office.Interop.Excel.

    Please guide me.

    RupuTech

    You can use google to search for other answers

    Custom Search

    More Threads

    • insert image in sql server database by ASP.NET by c#
    • help
    • Microsoft .Net Framework 3.5 installation has failed
    • Need a Second Opinion...
    • Datawindow.net and deployment
    • help with c# windows application
    • Where is the release notes for .Net Framework 2.0 Service Pack 1?
    • I Cant Install Visual Stdio 2008 Pro Please Help
    • .NET Framework Tools with Visual Studio 2008
    • error 25015 .net framework 2.0