Office がインストールされておらず、今後もインストールされないサーバーでアプリケーションを実行しようとしています。
using EXCEL = Microsoft.Office.Interop.Excel;
...
EXCEL.Application app = new EXCEL.Application();//Exception thrown here
コードは自分のシステムでは正常に機能していますが、サーバーでは次の例外が発生します。
Unhandled Exception: System.Runtime.InteropServices.COMException:
Retrieving the COM class factory for component with CLSID {...} failed
due to the following error: 80040154 Class not registered
(Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
どちらのシステムも 32 ビットで、アプリケーションの exe の横に Excel Interop dll をコピーしました。O2010PIAもインストールしました。
リードはありますか?