ActiveX component can't create object: 'Excel.Application' error ONLY in IIS

S

Steve Kershaw

Hi,

I have a simple web page that starts Excel and fills it with some
dummy data. Using IE I can run this web page from the C: drive (IE: "C:
\startexcel.htm") and it runs fine. However, when I put the web page
in the wwwroot directory in IIS and try to run it there (IE: "http://
startexcel.htm") it gives me the error:

Error: ActiveX component can't create object: 'Excel.Application'

The code line that fires the error can be seen below:

<SCRIPT LANGUAGE="VBScript">

sub button1_onclick()

' Launch Excel
dim app
set app = createobject("Excel.Application")

end sub

Is there a way to start Excel from IIS using VBScript? Or JavaScript
even?

Thanks
Steve
 
P

Patrice

This is not allowed by default for obvious safety reasons.. You would need
to alter the default security settings to do that (such as adding your site
to a trusted zone and allowing activex control not marqued as safe).
 
M

Mark Rae [MVP]

Running Office applications from an IIS web server is not recommended and
not supported. These apps were never designed to be ASP COM components
that
you can run in a web page.

True, but the OP is not trying to do this - he's trying to make an aspx page
launch Excel client-side and, of course, default security settings won't
allow this...
You can use the Office Web Components package if you meet the required
licensing requirements.

Microsoft has discontinued OWC:
http://blogs.msdn.com/excel/archive/2006/07/17/668544.aspx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,734
Messages
2,569,441
Members
44,832
Latest member
GlennSmall

Latest Threads

Top