在我的MVC 5应用程序中,我想要使用Microsoft.Office.Interop.Excel
库。我使用的是Visual Studio 2013和Office 2013。我添加了一个引用Microsoft.Excel 15.0 Object Library
,并在我的类中添加了using Excel = Microsoft.Office.Interop.Excel;
。当我点击build
时,它不显示任何错误,并告诉我Build Complete
,但是当我运行我的应用程序时,我遇到了这个错误
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS1748: Cannot find the interop type that matches the embedded interop type 'Microsoft.Office.Interop.Excel.Application'. Are you missing an assembly reference?
Source Error:
[No relevant source lines]
Source File: Line: 0
什么可能会是它?