2

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.Excel

Problem 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 found

Any ideas on how to solve this? Thanks.

4

2 回答 2

5

You should Add Reference to Microsoft.Office.Interop.Excel component

于 2013-02-12T05:55:10.217 回答
3

with Visual Studio 2013 the answer to this question is to add reference:

Microsoft Excel 15.0 Object Library

于 2015-06-17T22:02:29.020 回答