Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ActiveX component can't create object: 'Excel.Application' error ONLY in IIS

Reply
Thread Tools

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

 
 
Steve Kershaw
Guest
Posts: n/a
 
      07-17-2007
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

 
Reply With Quote
 
 
 
 
Patrice
Guest
Posts: n/a
 
      07-17-2007
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).

--
Patrice

"Steve Kershaw" <(E-Mail Removed)> a écrit dans le message de news:
(E-Mail Removed). com...
> 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
>



 
Reply With Quote
 
 
 
 
=?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
Guest
Posts: n/a
 
      07-17-2007
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. You can use the Office Web Components package if
you meet the required licensing requirements.

-- Peter
Recursion: see Recursion
site: http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
bogMetaFinder: http://www.blogmetafinder.com



"Steve Kershaw" wrote:

> 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
>
>

 
Reply With Quote
 
Mark Rae [MVP]
Guest
Posts: n/a
 
      07-17-2007
"Peter Bromberg [C# MVP]" <(E-Mail Removed)> wrote
in message news:(E-Mail Removed)...

> 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/...17/668544.aspx


--
Mark Rae
ASP.NET MVP
http://www.markrae.net

 
Reply With Quote
 
=?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
Guest
Posts: n/a
 
      07-17-2007
Right but if you read that post, they haven't "discontinued" OWC - they just
aren't shipping any new versions. You can also use OWC on the client, as I
recall.
Peter

--
Recursion: see Recursion
site: http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
bogMetaFinder: http://www.blogmetafinder.com



"Mark Rae [MVP]" wrote:

> "Peter Bromberg [C# MVP]" <(E-Mail Removed)> wrote
> in message news:(E-Mail Removed)...
>
> > 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/...17/668544.aspx
>
>
> --
> Mark Rae
> ASP.NET MVP
> http://www.markrae.net
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ActiveX component can't create object error Abe Simpson Windows 64bit 5 03-10-2010 06:13 PM
"activex component can t create object" error with .net dll in vb6 =?Utf-8?B?cGF0cmlja2RyZA==?= ASP .Net 2 09-18-2007 08:42 AM
Error 429 ActiveX component can't create object Abdhul Saleem ASP General 4 11-27-2006 06:16 AM
ActiveX apologetic Larry Seltzer... "Sun paid for malicious ActiveX code, and Firefox is bad, bad bad baad. please use ActiveX, it's secure and nice!" (ok, the last part is irony on my part) fernando.cassia@gmail.com Java 0 04-16-2005 10:05 PM
Outlook.Application???? Cannot create ActiveX component. W. Broersen ASP .Net 2 01-21-2004 02:02 PM



Advertisments