谢谢I try searching this error to internet and I found same error but he was using a Word Application, also this(Using Component Services)http://technoblogy.net/retrieving-the-com-class-factory-for-component-with-clsid-00024500-0000-0000-c000-000000000046-failed-due-to-the-following-error-80040154/[^].I'm afraid that when I try this solution that this will cause problem to there computer or it will cause another error to my program.Is anybody know any other way to solve this error.Please, help meThanks推荐答案 hi, 应将Excel文件的支持文件放入您的应用程序目录。Supporting file for Excel file should be placed in your application directory.有两种解决方法 1.平台问题只需用编译代码即可X86'而不是'任何CPU' 来点击ProjectMenu - >窗体属性 - >构建标签 - >平台目标改为X86 ---------------------------- ---------------------------- 2.点击开始 - - >运行 类型 dcomcnfg 组件服务窗口将打开。 组件服务 - >电脑 - > MyComputer - > DCOM配置 - >选择微软EXCEL应用程序 右键单击它 - >属性 - >安全 - >午餐和激活许可TAB 选择自定义选项卡 - >点击编辑添加网络服务用户和用户组授予权限。 对访问权限和配置执行相同操作权限。There are two workarounds1.it a platform issue just compile your code with 'X86' rather than 'Any CPU'to do that click on ProjectMenu --> windows form properties --> Build tab --> platform target change it to X86--------------------------------------------------------2. click on Start --> Run type dcomcnfg component services window will open. component services --> computers --> MyComputer --> DCOM Config --> select microsoft EXCEL applicationright click on it --> properties --> security --> Lunch and activation permission TABselect customize TAB --> click on edit add Network Services user and Users group give permission.do same for access permission and configuration permission. exel not location in location / dcom configexel not found in location/dcom config 这篇关于VB.NET错误(由于以下错误,检索CLSID为{00024500-0000-0000-C000-000000000046}的组件的COM类工厂失败:80040154)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 05-31 19:47