While trying to read excel file in C# console application, i am getting following error:
"Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80080005 Server execution failed (Exception from HRESULT: 0x80080005 (CO_E_SERVER_EXEC_FAILURE))".
Below is the code: using Application = Microsoft.Office.Interop.Excel.Application; Application excelApp = null; Microsoft.Office.Interop.Excel.Workbook excelWorkbook = null; try { excelApp = new Application { Visible = false }; } The Error is occurring on folowing line:
excelApp = new Application { Visible = false }; I have also tried following configuration from dcom properties for excel application: