View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Paul_IRET Paul_IRET is offline
external usenet poster
 
Posts: 1
Default Problem using Interop.Excel in a web service

I'll try to explain in detail without taking too much of your time!

I have a website running that uploads excel files. In order to make sure
the excel files are in the correct format, I call a web service, which uses
the Microsoft.Interop.Excel assembly dll. This process was set up on a
production server for Excel 2003 and it worked fine. However, we needed to
upgrade its capability for Excel 2007. I therefore set the web service up on
my laptop, installed the Office 2007 PI Assemblies, and got it working fine
locally. I tried to set the same exact thing up on a test server before
pushing it to production, but cannot get it to work.

What happens is the web service is running under a local user account on the
server, which is a local admin on the server. The web service has the user
open Excel, and inspect the document. On my local machine, if I run task
manager, Excel opens when I run the code, has activity for a couple seconds,
closes, and the file uploads perfectly. When I go do it on the server, Excel
opens, has a little activity, but then just stays open in task manager and
the website times out.

Here's the kicker. When I log in to the server as the web service user, it
works fine when I go to the website on my local machine. When I'm logged in
to the server as another user, or not logged in at all, it hangs and doesn't
work. It DOES work with Excel 2003 files though! If it helps, the part of
the code where I can debug to is the Application.Workbooks.Open function, and
then when it calls it, it hangs.

I'm confused, I've tried so many things and cannot figure out what it is.
Please help, it would be very greatly appreciated! Thanks a lot!