Could not load file or assembly 'Microsoft.Office.Interop.Excel, Version=14.0.0.0

One way - Install MS Office (MS Excel)


I know that this thread is a little bit old but I had the same error and I solved it (it works in my project).

In my web.config file I had assemblies added:

<add assembly="office, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"/> and many other office assemblies.

The thing I have done is that I have removed all the assemblies from web.config file and had added dlls as a reference - Microsoft.Office.Interop.Excel.dll in this case.

I am not an expert and I just thinking loudly that web.config file is trying to pull dll. file from C:\Windows\assembly\ and if there if it could not be foud, returns error.

You don't have to install office or other unneccessary stuff on you server.

Hope this help someone.


Correct procedure to use Excel in C# Projects is:

  1. Add reference to Excel Interop Library(Assembly)
  2. Add Excel in using section
  3. Now use it in your coding.


The first step will work if you have Office(Excel) Installed in your PC. If not then install. Then add reference to Microsoft.Office.Interop.Excel of the version you need.

a. If list doesn't shows the desire version then you may have another vision of Office with Excel installed. By The Way, you can use any.

b. If you don't find anything like Microsoft.Office.Interop THEN may be office not installed OR you have Office 2013 or later. For higher version you can add assembly by going into COM tab of add-reference windows and add Microsoft Excel {version-no} Object Library. This will add the same.

c. If you already have Microsoft.Office.Interop... in References with yellow-triangle-mark THEN remove it first.



After that second step will totally work: using Excel=Microsoft.Office.Interop.Excel;



And finally as a third step you can create Excel object by Excel.Application xlApp = new Excel.Application();.