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

  • Thread starter Thread starter Steve Kershaw
  • Start date Start date
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
 
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).
 
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
 
Back
Top