Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a script that generates an Excel spreadsheet that appears to be working all the way until it reaches the SaveAs() call. I've tried changing DCOM settings, Application pool settings, impersonation settings in web.config and none of them seem to do anything.

Is there anything I'm missing?

share|improve this question
add comment

3 Answers

Obvious question I suppose, but have you checked you have access to the folder where the spreadsheet is being saved? From the tags I'd guess this is being done from an ASP.Net page on a web server in which case it will be running as either the user opening the page if you're using authentication or as, erm, something else if it's anonymous access.

JR

share|improve this answer
    
That was the first thing I checked. I was able to write a simple text file with no problems so the folder permissions doesn't seem to be the problem. I've tried writing to other folders that allow Everyone full access but Excel interop keeps throwing an exception. Perhaps it's a Session 0 problem? –  wm_eddie Jun 22 '09 at 7:08
add comment

Are you doing Excel automation on the server side? Then if I were you, I would consider the advice provided in KB 257757.

http://support.microsoft.com/kb/257757

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.