Excel can not be activated from a Service or the Task Scheduler

This applies to any program type including c#, VB, PowerShell etc. that uses OLE Automation.

There are many different solutions/configurations.
Please be EXTREMELY careful when modifying the windows configuration.
Here is the most common solution – Please note that it does NOT work for all configurations. So you have to experiment a bit.

Step 1.
Open Component Services (Start -> Run, type in dcomcnfg)
Drill down to Component Services -> Computers -> My Computer and click on DCOM Config

Step 2.
Right-click on Microsoft Excel Application and choose Properties.
Some times “The interactive user” works .. and sometimes “The user”.

Step 3
Make sure the following folders exists.

Need more help with this?
Don’t hesitate to contact us here.

Thanks for your feedback.