I am working with Windows Service written in C#. Through this Windows Service I am automating Excel in a programmatic way.
Excel.Application excel = Excel.Application();
This code was working fine with all versions of Excel (2003, 2007, 2010, 2013). Recently I have installed Office 365 in my machine. Suddenly I am getting below exception when I automate the Excel using above call:
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)).
Can anyone let me know, is there any special consideration should be taken when automating the Office 365 Excel via Windows Service?