如何在控制台应用程序上导入Microsoft.Office.Interop.Excel?(How to import Microsoft.Office.Interop.Excel on a console application?)
它可以在我的网站应用程序上正常工作,但是我也必须在将从任务计划程序运行的控制台应用程序上使用它。
这就是我称之为导入的方式:
Imports Excel = Microsoft.Office.Interop.Excel问题是当我尝试从控制台应用程序导入它时,出现此错误:
Namespace or type specified in the Imports 'Microsoft.Office.Interop.Excel' doesn't contain any public member or cannot be found有关如何解决这个问题的任何想法? 谢谢。
It works fine on my Website Application, but I have to use it too on console application that will run from the task scheduler.
This is how I'm calling the import:
Imports Excel = Microsoft.Office.Interop.ExcelProblem is when I try to import it from the console app, I get this error:
Namespace or type specified in the Imports 'Microsoft.Office.Interop.Excel' doesn't contain any public member or cannot be foundAny ideas on how to solve this? Thanks.
最满意答案
您应该Add Reference到Microsoft.Office.Interop.Excel组件
You should Add Reference to Microsoft.Office.Interop.Excel component
更多推荐
发布评论