I have a project that uses Interop Excel to build up a report. This runs just fine and the report is created every time.
The problem that I'm facing now is when published, I'm not able to run it, it is built and published but I get an exception when I try to create the Excel file with this line:
var excelApp = new Excel.Application();
The exception is the one below, I've added multiple references to assemblies but I'm not sure if maybe I'm missing some COM reference for this to run.
Unhandled Exception: System.Runtime.InteropServices.COMException: Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
xlsx
files without requiring Excel on the production (or the build) server. - Panagiotis Kanavos