use Microsoft.Office.Interop.Excel.Application on IIS

0

I have a problem shelter my WebSite application on IIS.

I tried to generate excel file using Microsoft.Office.Interop.Excel.Application, it work in debug but when i shelter my website on IIS, the generating file not work.

I have a problem in the following instruction :

Microsoft.Office.Interop.Excel.Application excelApp = new Microsoft.Office.Interop.Excel.Application();

And i have the following error :

System.Runtime.InteropServices.COMException: '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)).'

c#
asp.net-mvc
iis
office-interop
asked on Stack Overflow Feb 1, 2018 by Hm Ch

1 Answer

0

You might also want too look into https://blogs.msdn.microsoft.com/adioltean/2005/06/24/when-cocreateinstance-returns-0x80080005-co_e_server_exec_failure/

Also, do you have the Office Web Tools installed on your server?


User contributions licensed under CC BY-SA 3.0