在系统中需要把数据导出到excel并且压缩,然后报了这个问题:

我在网站上找到了方法:

地址:https://social.msdn.microsoft.com/Forums/vstudio/en-US/2f923b6d-aebb-42ff-804d-21a3763d491b/com-class-factory-error-8000401a?forum=csharpgeneral

Hi Varun,

It should be the permissions problem.
Please have a try using the following steps to Configure DCOM:
1. Go to the Start-Run menu to type in "dcomcnfg"  and hit enter to load "Component Services" MMC.
2. Select the "Microsoft Excel Application" item through "Component Services" MMC->Component Services->Computers->My Computer->DCOM Config->Microsoft Excel Application
3. Right click and select Properties->Select Identity Tab->Select This user and add the Administrator accout and password
4. Select Security Tab, Under "Launch and Activation Permissions", Choose "Customize", Click "Edit" button, Add the everyone account and add all the Permissions.
5. Do the same thing in "Access Permissions" and "Configuration Permissions"

Best regards,
Guo

如何解决Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 8000401a. 问题的更多相关文章

  1. 使用Gird++打印出现“Retrieving the COM class factory for component with CLSID”的解决办法

    我们的接口需要返回一个gird++生成PDF文件的二进制数据,在本地测试都很好,发布到服务器上一直出现“Retrieving the COM class factory for component w ...

  2. 【Excel】Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046}:

    [Excel]Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-0000000000 ...

  3. 异常:Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005.

    异常:Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} ...

  4. C#-Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046}

    异常信息如下 捕获到执行这句时异常: Excel.Application ep = new Excel.ApplicationClass(); Retrieving the COM class fac ...

  5. Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005.

    Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} fai ...

  6. C# - (0x80040154): Retrieving the COM class factory for component with CLSID {877AA945-1CB2-411C-ACD7-C70B1F9E2E32} failed

    1. Exeption Error: System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM clas ...

  7. Retrieving the COM class factory for component with CLSID XX failed due to the following error: 80070005 拒绝访问。

    环境及异常信息说明 环境说明: Win2008 R2 企业版 x64 .IIS 7.0 功能说明:服务端操作Excel,(上传Excel到服务器,并在服务器端读取Excel中的数据) 异常信息:Ret ...

  8. Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005 拒绝访问

    异常信息:Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046 ...

  9. C# Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005

    环境说明: Win2008 R2(中文版) x64 .IIS 7.0 功能说明:上传Excel到服务器,并在服务器端读取Excel中的数据: 异常信息:Retrieving the COM class ...

随机推荐

  1. 51nod 1405 树的距离之和(dfs)

    http://www.51nod.com/onlineJudge/questionCode.html#!problemId=1405 题意: 思路: 先求出所有点到根节点的距离,需要维护每棵子树的大小 ...

  2. python Exception raise

    异常是指程序中的例外,违例情况.异常机制是指程序出现错误后,程序的处理方法.当出现错误后,程序的执行流程发生改变,程序的控制权转移到异常处理.Exception类是常用的异常类,该类包括Standar ...

  3. Python Scrapy安装

    直接安装scrapy 各种报错,后来各种百度终于解决了,如下是亲身的经历. pip install scrapy 这样直接会报错. 第一步: 先安装wheel pip install wheel 第二 ...

  4. Python3简单爬虫抓取网页图片

    现在网上有很多python2写的爬虫抓取网页图片的实例,但不适用新手(新手都使用python3环境,不兼容python2), 所以我用Python3的语法写了一个简单抓取网页图片的实例,希望能够帮助到 ...

  5. Systemd初始化进程/RHEL 6系统中System V init命令与RHEL 7系统中systemctl命令的对比

    Linux操作系统的开机过程是这样的,即从BIOS开始,然后进入Boot Loader,再加载系统内核,然后内核进行初始化,最后启动初始化进程.初始化进程作为Linux系统的第一个进程,它需要完成Li ...

  6. JDBC连接数据库的安全性连接方法

    PreparedStatement ps=null; ResultSet rs=null; Connection ct=null; try { Class.forName("com.mysq ...

  7. Android requestCode的限制

    一. why ? 由于才疏学浅,在开发中requestCode的让我很困惑.困惑是因为什么呢,是因为弄混了.要想弄明白,不困惑,来想一想用到requestCode的地方: ① startActivit ...

  8. 力扣(LeetCode)415. 字符串相加

    给定两个字符串形式的非负整数 num1 和num2 ,计算它们的和. 注意: num1 和num2 的长度都小于 5100. num1 和num2 都只包含数字 0-9. num1 和num2 都不包 ...

  9. 学习笔记36—坚果云 | Papership或Zotero使用webDAV验证服务器不成功怎么办?

    很多人都喜欢用坚果云作为Zotero的第三方云盘,从而无限扩展Zotero的存储空间.可是大家在Papership或zotero客户端中验证坚果云webDAV服务器时,会出现验证不成功的问题,相信这个 ...

  10. public,protected,private

    1.public:public表明该数据成员.成员函数是对所有用户开放的,所有用户都可以直接进行调用 2.private:private表示私有,私有的意思就是除了class自己之外,任何人都不可以直 ...