Interop Library Support

KP 0 Reputation points
2025-04-17T15:48:35.68+00:00

Hi!

I am creating a basic desktop application in order to refresh external data connections and pivot tables within Excel. I am using the interop library. I am getting the following error:

Retrieving the COM class factory for component with CLSID {ID} failed due to the following error:

80080005 Server execution failed (0x80080005 (CO_E_SERVER_EXEC_FAILURE)).

(I can include the ID if that is necessary)

I have looked online for this error and understand its an issue with opening the excel workbook? I have tried multiple solutions including opening dcomcnfig to make sure the current logged in user is what is opening it. Is there possibly a compatibility issue? I'm on windows 11. Thanks so much!

Excel Management
Excel Management
Excel: A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.Management: The act or process of organizing, handling, directing or controlling something.
1,869 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Michael Taylor 58,451 Reputation points
    2025-04-17T16:20:43.9233333+00:00

    Please provide us the code you're using and information about your application. For example is it x86 or x64? Do you have the corresponding x86/x64 version of Office installed?

    Does it work if you create a new Excel file using the API?

    Please show us the exact line that is failing along with the callstack.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.