2010-06-25

InteropServices.COMException (0x800A03EC): Microsoft Office Excel cannot access the file

I've been working on a problem for the past half a day with the MS Office 2007 PIA.  The issue is with MS Office automation on Windows Server 2008 (x64).

This statement fails:

                wb = (Excel._Workbook)(books.Open(_sourceFilename, 0, true, missing, missing,
                                                 missing, true, missing, missing, missing, missing,
                                                 missing, missing, missing, missing));
with error:
System.Runtime.InteropServices.COMException (0x800A03EC): Microsoft Office Excel cannot access the file ''. 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.
   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)
The solution is an odd one: create the directory "C:\Windows\SysWOW64\config\systemprofile\Desktop".

That's it.  Works like a charm.