[英]Error : 800700c1 in instantiating an object for Microsoft.Office.Interop.Excel.Application
I am getting the below error when instantiating the Microsoft.Office.Interop.Excel.Application() for generating Excel from the winforms app.在实例化 Microsoft.Office.Interop.Excel.Application() 以从 winforms 应用程序生成 Excel 时出现以下错误。
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这之前是有效的,突然它停止工作,尽管代码和 excel 的版本没有变化。我唯一能看到的变化是在过去几周安装了一些 windows 10 个更新,但我不确定这是否是原因问题
retrieving the com class factory for component with clsid {00024500-0000-0000-c000-000000000046} failed due to the following error: 800700c1.为 clsid 为 {00024500-0000-0000-c000-000000000046} 的组件检索 com class 工厂失败,原因是以下错误: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.对于相同类型的操作,我可以看到许多访问被拒绝(错误:80070005 访问被拒绝)的解决方案,但没有针对错误: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.我正在 32 位运行该应用程序,并且我已经重新安装了 office 2016(32 位)套件,但仍然出现错误。
Any help in direction of solving would help.解决问题的任何帮助都会有所帮助。
Deleting the file "C:\\Program" fixed the issue.删除文件“C:\\Program”解决了这个问题。 No idea how the file was created and why deleting it solve the excel generation problem.不知道文件是如何创建的以及为什么删除它可以解决 excel 生成问题。
Just to piggyback off of Vignesh AJ's solution, this Program file seems to have appeared after a Citrix Workspace for Windows update.只是为了利用 Vignesh AJ 的解决方案,这个程序文件似乎是在适用于 Windows 的 Citrix Workspace 更新之后出现的。 The file can be moved or deleted from C drive to solve the problem.可以从C盘移动或删除文件来解决问题。
In my case c:\Program was created by Notepad++, and yes removing it did help.在我的例子中 c:\Program 是由 Notepad++ 创建的,是的,删除它确实有帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.