Thanks a lot for the feedback here! I think this is on the right track. We have office 2003 here, so not quite the same, but hopefully close. I am getting the following error when I try it out:
Server Error in '/testing' Application.
Exception from HRESULT: 0x800A03EC
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Runtime.InteropServ
Any ideas?
I am gonna hit google...
CODE:
Main Topics
Browse All Topics





by: LordWabbitPosted on 2008-05-01 at 04:30:49ID: 21477719
Here you go, you might want to write this in VB instead, C# does not do optional parameters so you end up with an awful lot of Type.Missing which can get tedious. I saw a c# wrapper for ms office once which used overloads and hid all the Type.Missing gunk, but a quick google didn't bring up anything. Working with office can create a lot of orphaned excel processes (till you get everything working 100%) so keep task manager open and check for any excel processes which are locking your test files. Even better for testing purposes write a small method which checks for any open excel processes and nukes them.
One thing - I was not sure which version of office you were using, I am using office 2007 and the com interops created between different versions will not be the same - however I have not found any significant differences in the actual methods and collections used (at least not for what I have had to do).
Select allOpen in new window