简体   繁体   English

打开Excel文件时出错

[英]error when opening excel file

i have a web service that reads data from excel using Microsoft.Office.Interop.Excel. 我有一个Web服务,可以使用Microsoft.Office.Interop.Excel从excel读取数据。 It works fine on my local machine but when i upload it on a server it gives the following error 它在我的本地计算机上工作正常,但是当我将其上传到服务器上时,出现以下错误

Server was unable to process request. 服务器无法处理请求。 ---> Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005. --->检索具有CLSID {00024500-0000-0000-C000-000000000046}的组件的COM类工厂失败,原因是以下错误:80070005。

i googled and tried to follow the suggestion of DCOMCNFG-> component services-> computers-> my computer-> com+ appications but then i dont find the Microsoft excel to change rights. 我用谷歌搜索并尝试遵循DCOMCNFG->组件服务->计算机->我的计算机-> com +应用程序的建议,但随后我找不到Microsoft Excel来更改权利。 Office 2003 is installed in server and file i am trying to open is 2003 too. Office 2003已安装在服务器中,我也想打开的文件也是2003。 Please help!! 请帮忙!! Thanks 谢谢

You won't find Excel, you'll have to find the matching CLSID and alter the Activation/Launch permissions. 您将找不到Excel,必须找到匹配的CLSID并更改“激活/启动”权限。

Standard Disclaimer: Unattended execution of office on the server is not recommended by Microsoft, but a lot of us do it happily (myself included). 标准免责声明:Microsoft不建议在服务器上无人值守执行Office,但是我们很多人都乐于这样做(包括我自己)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM