title: Exception HResult 0x800a03ec when trying to open Excel with Microsoft.Office.Interop.Excel.Workbooks.Open()
body: <p>Following Exception is thrown if I try to open an excel file on a client machine:</p>
  
  <pre><code>Exception from HRESULT: 0x800A03EC
  </code></pre>
  
  <p>Inner Exceptions: (empty)</p>
  
  <p>Stack Trace:</p>
  
  <pre><code>   at Microsoft.Office.Interop.Excel.Workbooks.Open(String Filename, Object UpdateLinks, Object ReadOnly, Object Format, Object Password, Object WriteResPassword, Object IgnoreReadOnlyRecommended, Object Origin, Object Delimiter, Object Editable, Object Notify, Object Converter, Object AddToMru, Object Local, Object CorruptLoad)
     at (own assembly)
  </code></pre>
  
  <p>This HResult is a very generic Error, I could not find any useful informations by it.</p>
  
  <p>My Setup:</p>
  
  <p>WCF Service running inside a Windows Service. The exact same Setup is working on three other machines.</p>
  
  <p>Things I can rule out:</p>
  
  <ul>
  <li>Wrong Path</li>
  <li>File does not exists</li>
  <li>File is corrupt</li>
  <li>File is write protected</li>
  </ul>
  
  <p><strong>Things I've done:</strong></p>
  
  <ul>
  <li>Created the Desktop folders as seen here (second Answer) <a href="https://social.msdn.microsoft.com/Forums/vstudio/en-US/4d6c383a-94eb-4898-9d22-aa4bb69be25b/" rel="nofollow noreferrer">https://social.msdn.microsoft.com/Forums/vstudio/en-US/4d6c383a-94eb-4898-9d22-aa4bb69be25b/</a></li>
  <li>Gave the Desktop Folders "Everyone" or "Jeder" Permissions ("Jeder" is the equivalent of "Everyone" in German)</li>
  <li>Started the Service with the currenlty active User</li>
  <li>Changed the DCOM Config for Excel as advised by Heidi2 (see Link above)</li>
  <li>Changed from Office 365 to Office Professional Plus</li>
  <li>Locale is set to en-US while trying to open the file</li>
  <li>Opened file manually which is supposed to be opened: no errors / warnings / user dialogs from excel</li>
  <li>Installed English - US on target machine</li>
  <li>Wrote an non WCF Service which starts the dll which executes the Interop request</li>
  <li>Wrote an Console Application which starts the dll which executes the Interop request</li>
  </ul>
  
  <p>Some Observations: </p>
  
  <ul>
  <li>If I remove the Desktop folders (see my first "Things I've done"), I get the error as described and resolved here: <a href="https://stackoverflow.com/questions/7106381">Microsoft Office Excel cannot access the file &#39;c:\inetpub\wwwroot\Timesheet\App_Data\Template.xlsx&#39;</a></li>
  <li>Excel is open for a short time in the task manager while the dll tries to open the excel file</li>
  <li>while I've had Office 365 installed, Office Click-Once Tasks opped up in Task Manager, sometimes freezing the Application. That's why I've switched to Professional Plus</li>
  <li>If the active language is set to English US, this error is not thrown anymore; but images, which are supposed to be rendered by Interop, are rendered blank</li>
  </ul>
  
  <p>What am I missing here?</p>