# If you have problems running Excel Command on Server

**URL:** <https://community.easymorph.com/t/if-you-have-problems-running-excel-command-on-server/3920>\
**Category:** Server (Hub) / Explorer\
**Created:** [September 24, 2022, 11:33am UTC](https://community.easymorph.com/t/if-you-have-problems-running-excel-command-on-server/3920 "2022-09-24T11:33:10Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![dgudkov](https://community.easymorph.com/user_avatar/community.easymorph.com/dgudkov/32/5_2.png) [@dgudkov](https://community.easymorph.com/u/dgudkov)\
**Post date:** [July 31, 2023, 4:47pm UTC](https://community.easymorph.com/t/if-you-have-problems-running-excel-command-on-server/3920/3 "2023-07-31T16:47:40Z")

</div>

A working tip suggested by @rebmanna here: [Run VBA Makro runs in Launcher, but not via ServerTask (Server version: 5.5.0.4) - #5 by rebmanna](https://community.easymorph.com/t/run-vba-makro-runs-in-launcher-but-not-via-servertask-server-version-5-5-0-4/4691/5).

It references this blog post by TroyB: [Troy versus SharePoint: Interactive Excel permissions](http://troyvssharepoint.blogspot.com/2012/07/stumbled-upon-interesting-one-today.html).

Given the importance of the information in this post, I'm copying it here, just in case the author decides to shut down the blog.

* * *

Stumbled upon an interesting one today, where I had a legacy application that needs to open excel to generate some excel spreadsheets. But when this happened i got the usual error:

System.Runtime.InteropServices.COMException (0x800A03EC): Microsoft Office Excel cannot access the file 'c:\temp\test.xls'. There are several possible reasons:  
• The file name or path does not exist.  
• The file is being used by another program.  
• The workbook you are trying to save has the same name as a currently open workbook.

For this example the application is running under an application pool account called ExcelAppPoolAct

Obviously the first step is to grant the correct permissions in component services. To do this:

1. Navigation to **Adminstrative Tools-\>Component Services-\>MyComputer-\>DCOM-\>Microsoft Excel Application**

2. Right Click on **Microsoft Excel**  **Application** and select **Properties**

3. Click the **Security** tab

4. Change Launch and Activation Permissions to **Customize**

5. Click **Edit**

6. Add ExcelAppPoolAct

7. Check **Local Launch** and **Local Activation**

Next we need to configure the systemprofile directory. You need to create a **Desktop** folder in one of the following paths, dependant on which version (32-bit or 64-bit) of Microsoft Office you are running. If creating the **Desktop** folder at one of the paths doesn't help, try creating the same folder at the second path.

| **Office Version** | **Folder** |
| --- | --- |
| 32-bit | C:\Windows\System32\config\systemprofile |
| 64-bit | C:\Windows\SysWOW64\config\systemprofile |

The next step is to configure the appropriate permissions to the folders for the Application Pool account, **ExcelAppPoolAct**. Again the folder is dependent on your version (32-bit or 64-bit) of Microsoft Office.

| **Folder** | **Required Permission** |
| --- | --- |
| C:\Windows\System32\config\systemprofile\Desktop | Read & Execute, List folder contents, Read |
| C:\Windows\System32\config\systemprofile\AppData\Roaming\Microsoft | Modify, Read & Execute, List Folder Content, Read, Write |
| C:\Windows\System32\config\systemprofile\AppData\Local\Microsoft | Modify, Read & Execute, List Folder Content, Read, Write |

| **Folder** | **Required Permission** |
| --- | --- |
| C:\Windows\SysWOW64\config\systemprofile\Desktop | Read & Execute, List folder contents, Read |
| C:\Windows\SysWOW64\config\systemprofile\AppData\Roaming\Microsoft | Modify, Read & Execute, List Folder Content, Read, Write |
| C:\Windows\SysWOW64\config\systemprofile\AppData\Local\Microsoft | Modify, Read & Execute, List Folder Content, Read, Write |

 ![image](https://community.easymorph.com/uploads/default/original/2X/6/63572436e854844891344f07b943fab7534911b3.png)

---

_[View the full topic](https://community.easymorph.com/t/if-you-have-problems-running-excel-command-on-server/3920)._
