by Hugo Häggmark
This is yet another of those things I really need to blog about so that I don’t ever forget this personally
So the background is as follows:
So I started my journey today with the hopes of just hooking up the existing scripts for generating the BizTalk binding-files with a TFS build. But for some reason no files were generated but I could see that Excel started and so forth.
After I while I decided to leave the Excel macro thingee and rewrite the complete Excel macro in C#, and I did and it worked just fine.
I hooked up my little console app with my build and got the following message:
System.Runtime.InteropServices.COMException (0x800A03EC): Microsoft Office Excel cannot access the file ‘c:\temp\test.xls’. There are several possible reasons:
Finally! some error I could search for.
I found the solution here in Excel 2007 automation on top of a Windows Server 2008 x64 and it stipulates that you should add the following folder structure to the server where you’re running Excel automation:
It almost felt silly after some 4 hours of rewriting an Excel macro to C# to just add a the Desktop folder under C:\Windows\SysWOW64\config\systemprofile and the build just worked perfectly!
Warning read this official Microsoft kb about support for this here in Considerations for server-side Automation of Office.
Hugotags: BizTalk - Error - Resolution - Team Build