Hi Guntram,
There are problems doing Office automation in a server or unattended
environment, particularly when using ASP. The limitations of doing
server-side automation are described in the following KB article :
257757 INFO: Considerations for Server-Side Automation of Office
http://support.microsoft.com/?id=257757
The problems are such that the environment is unsupported. I can give you
some guidance on how to get your application working , but since this is an
unsupported environment, I can't guarantee that the prbolem can be resolved.
Go to task manager and seen if you are getting an accumulation of Excel
processes. If so then Excel is not shutting down properly. Make sure you
are calling the quit method on the application object and setting the
object reference to nothing.
You probably want to try creating fewer application processes by opening
multiple work with the same instance of the application.
Another thing you should look for is the creation of temporary or hidden
Office objects. For example:
Dim objBook
objBook = objExlApp.Workbooks.Open(Filename:=strFileName)
set objBook = nothing
creates a temporary reference to an Excel Workbooks object that is never
release. This will prevent the Excel application from shutting down. The
fix for this issue is to create actual references to the intermediate
object that can be released. An example that fixes the above problem is
below:
Dim objBook
Dim objBooks
objBooks = objExlApp.Workbooks
objBook = objBooks.Open(Filename:=strFileName)
set objBooks = nothing
set objBook = nothing
Thanks,
Jim
Jim Vita
Microsoft Developer Support
This posting is provided "AS IS" with no warranties, and confers no rights.