Hi,

need some help while trying to call excel from ASP.

I'd like to save the result of an SQL-query into an excel-file. So i open excel by using following code.

dim exApp
set exApp=Server.CreateObject("Excel.Application")

After that i open a new workbook, write to it and save its content. Everything works fine - on my developer pc.

----------

When i try the same on our IIS-server it seem to hang for about 2 minutes and than stopps at the line with the Server.CreateObject, telling me about ASP 0177 "Server failed to create object".

Why could this happen?

-Excel is installed on the server correctly. When i try similar code in VB on the server it works fine.
-The IUSER_machine user has all privilegs to create the object (in the registry and in the file system). I asserted that manually. And i logged on as IUSER_machine and called similar VB-code, which worked fine.
-When i look into the task manager, i can see that Excel gets even started by the IIS.

My thoery is following:
I know that COM-OutOfProcess-servers (like Excel) need to call CoRegisterClassObject when requested by the COM runtime environment. In my opinion that call fails. So the IIS waits a minute or two for creation of the object. After that it runs into a timeout and throws error ASP 0177. Is that possible and what can i do to get it work?

I'm running out of ideas. Have you got any?

Every suggestions appreciated (really EVERY)
Thanks in advance

Peter