COM Exception 80040154 When creating an Excel Application

前端 未结 2 1163
再見小時候
再見小時候 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 11:50

    The Office Interop assemblies are runtime-callable wrappers (RCW) that allow you to interoperate with a copy of Office that's installed on the system via the COM API that it exposes.

    The error message indicates that Excel isn't installed, exactly what I'd expect. You can't use the Interop assemblies on a machine without Office.

提交回复
热议问题