Excel COM automation via interactive user stops working when user logs off

后端 未结 5 755
谎友^
谎友^ 2020-12-14 21:44

I have developed a server app that uses Excel 2007 COM automation to convert some xls files. It is started as a service on a Windows Datacenter instance, running under its o

5条回答
  •  臣服心动
    2020-12-14 22:35

    I've had this issue, and I found that the answer is actually in the DCOM Configuration.

    I did the following to resolve the issue:

    1. Open the Excel DCOM Properties
    2. Go to the Identity tab
    3. Select This User
    4. Enter the credentials of someone who has access to Excel

    You may need to go to the Security tab and ensure the user you've specified above has appropriate Permissions.

    After doing this, I was able to Log Off the Server while still using the Excel COM Automation libraries.

提交回复
热议问题