Reputation: 306
I am getting the below error when instantiating the Microsoft.Office.Interop.Excel.Application() for generating Excel from the winforms app.
This was working before and suddently it stopped working eventhough there was no change in code and in version of excel. Only change I could see is there were some windows 10 updates getting installed in past weeks but I am not sure whether that was the cause for the problem
retrieving the com class factory for component with clsid {00024500-0000-0000-c000-000000000046} failed due to the following error : 800700c1.
I could see many solutions for access denied (error: 80070005 Access is denied) for the same type of operation, but none for error : 800700c1.
I am running the application in 32 bit and I have re-installed the office 2016 (32-bit) suite but still I am getting the error.
Any help in direction of solving would help.
Upvotes: 4
Views: 7637
Reputation: 11
In my case c:\Program was created by Notepad++, and yes removing it did help.
Upvotes: 1
Reputation: 931
Just to piggyback off of Vignesh AJ's solution, this Program file seems to have appeared after a Citrix Workspace for Windows update. The file can be moved or deleted from C drive to solve the problem.
Upvotes: 0
Reputation: 306
Deleting the file "C:\Program" fixed the issue. No idea how the file was created and why deleting it solve the excel generation problem.
Upvotes: 9