This project has moved and is read-only. For the latest updates, please go here.

Could not load assembly Microsoft.Office.Interop.Excel

Topics: Resolved
Sep 4, 2009 at 5:58 PM

When I launch Excel 2007 I get this exception:

Could not load file or assembly 'Microsoft.Office.Interop.Excel, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference (Exception from HRESULT: 0x80131040)

After I click OK the add-in works fine. I have no problems with it once I've acknowledged the exception.  Any ideas?  I'd like to share the add-in with other people on my team but verified it happens for another user too.

Sep 4, 2009 at 7:27 PM

Hmm. That's really odd. I haven't seen that error.

Googling that error showed me this:

You might give that a shot and let me know if it works. The odd thing is that I've specifically tested that scenario (where Excel was installed without that .NET Programmability Support checked) and the OLAP PivotTable Extensions installer includes all the DLLs you need. (Can you check in "c:\program files\OLAP PivotTable Extensions" that you have Microsoft.Office.Interop.Excel.dll? You should.)

Also, what version of Windows, what service pack of Excel, what other versions of Excel (like 2003) do you have installed, etc.

Sep 4, 2009 at 7:31 PM

By the way, that issue I mentioned with the installer including all the DLLs it needed was fixed in version 0.5.2 which was over a year ago.

Sep 4, 2009 at 9:16 PM

Thanks for the quick response.  I checked the install and .NET Programmability Support was set properly (to run from my computer).  The folder also contains Microsoft.Office.Interop.Excel.dll, the version is 12.0.4518.1014

My OS is XP SP2 (yes really).
Excel is 2007, 12.0.6331.5000 SP1 MSO (12.0.6320.5000)
I also have VS2008 9.0.30729.1 SP with VS2008 VSTO
There are no other versions of Office or Excel

Oct 15, 2009 at 5:05 PM

Any additional thoughts about this?  I'm still experiencing the issue.  Should I have originally posted this in the issue tracker section?


Oct 15, 2009 at 5:28 PM

Sorry for the silence. I'm pretty stumped about this one.

Can you make sure you installed this:

Visual Studio 2005 Tools for Office Second Edition Runtime

You might try uninstalling VS2008 VSTO if the above installation doesn't work.

Jun 2, 2010 at 9:50 PM

I've just release a new installer (version 0.7.0) which is completely revamped. The driving reason behind this was getting one codebase that would sucessfully install for Excel 2007 and Excel 2010... and to get an installer that would work for the new 64-bit Excel 2010.

Anyway, please try this new installer and let me know if it fixes your problem. Let me know how it goes.

Marked as answer by furmangg on 6/10/2014 at 3:24 PM
Jun 2, 2010 at 11:43 PM

Hmm, hopefully I can recreate it now but since you responded I have to try! Thanks.

Jun 7, 2010 at 2:44 PM
I am not having the problem with 0.7.0 however I also tried to recreate the problem again with 0.6.2 and could not get the exception any longer. Thank you for releasing a new version and for trying to close out this thread.