Excel automation through Windows Task Scheduler throwing an error - 80080005 Server execution failed (Exception from HRESULT: 0x80080005 (CO_E_SERVER_EXEC_FAILURE)). RRS feed

  • Question

  • Hi,

    We have a console application to automate the excel data refresh everyday at a particular time of the day. It is working fine when we switch off the office updates. But when an office update happens, immediately this stops working and throwing this error, "exception 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))." But when we try to execute the same console application through command prompt, it is working fine and when the same is scheduled through SQL agent, then also it is working fine. Only the task that scheduled in the Task Scheduler is not working.

    Workaround tried so far:

    1. Set the Microsoft Excel Component's identity to "The Interactive user". This is working fine when a user is logged on in the server. So, this cannot be a permanent solution.

    2. Tried to create the following folders in the windows directory. "C:/Windows/System32/config/systemprofile/Desktop", "C:/Windows/SysWOW64/config/systemprofile/Desktop", still it is not working. 

    I am using Microsoft Office 2016 and the server is Windows Server 2016

    Any leads on this will be very helpful.

    • Edited by Kamal1001 Tuesday, December 15, 2020 1:59 PM Adding the system specifications
    Tuesday, December 15, 2020 1:22 PM