COM Exception 80040154 When creating an Excel Application

前端 未结 2 1143
再見小時候
再見小時候 2021-01-13 11:39

I\'m trying to run my application on a server which does not and will not have Office installed on it.

using EXCEL = Microsoft.Office.Interop.Excel;
...
EXC         


        
2条回答
  •  旧巷少年郎
    2021-01-13 12:04

    I'm trying to run my application on a server which does not and will not have Office installed on it.

    As Joe said, you'll need to install Excel for Interop to work. If you're dead-set against that, consider third-party alternatives. In general, Microsoft does not recommend installing Office on your server and using it with Interop - that being said, it will work (at least most of the time).

提交回复
热议问题