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

Could not load file or assembly 'Microsoft.Office.Interop.Excel, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c

 

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

A conflict was found between different versions of the same dependent component. 

For example, in my program A, the class library B is referenced, and the Microsoft.Office.Interop.Excel component with Version=12.0.0.0 is added in A, and the Microsoft.Office.Interop.Excel with Version=14.0.0.0 is added in B. component, the result will report the above error. 

The solution is to modify the Microsoft.Office.Interop.Excel component in A and change it to Version=14.0.0.0.

 
 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325254966&siteId=291194637