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

Discussion in 'ASP .Net' started by Steve Kershaw, Jul 17, 2007.

  1. 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
     
    Steve Kershaw, Jul 17, 2007
    #1
    1. Advertising

  2. Steve Kershaw

    Patrice Guest

    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" <> a écrit dans le message de news:
    ...
    > 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
    >
     
    Patrice, Jul 17, 2007
    #2
    1. Advertising

  3. RE: ActiveX component can't create object: 'Excel.Application' error O

    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
    >
    >
     
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=, Jul 17, 2007
    #3
  4. Re: ActiveX component can't create object: 'Excel.Application' error O

    "Peter Bromberg [C# MVP]" <> wrote
    in message news:...

    > 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


    --
    Mark Rae
    ASP.NET MVP
    http://www.markrae.net
     
    Mark Rae [MVP], Jul 17, 2007
    #4
  5. Re: ActiveX component can't create object: 'Excel.Application' err

    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]" <> wrote
    > in message news:...
    >
    > > 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
    >
    >
    > --
    > Mark Rae
    > ASP.NET MVP
    > http://www.markrae.net
    >
    >
     
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=, Jul 17, 2007
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Steve Richter
    Replies:
    6
    Views:
    11,613
    Steve Richter
    Apr 14, 2005
  2. =?Utf-8?B?QWJoaXNoZWs=?=

    ActiveX component can't create object

    =?Utf-8?B?QWJoaXNoZWs=?=, Aug 21, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    533
    =?Utf-8?B?QWJoaXNoZWs=?=
    Aug 21, 2006
  3. =?Utf-8?B?cGF0cmlja2RyZA==?=

    "activex component can t create object" error with .net dll in vb6

    =?Utf-8?B?cGF0cmlja2RyZA==?=, Sep 18, 2007, in forum: ASP .Net
    Replies:
    2
    Views:
    1,100
  4. aa
    Replies:
    1
    Views:
    175
    [ + 2 0 r p 3 ]
    May 13, 2004
  5. Abdhul Saleem

    Error 429 ActiveX component can't create object

    Abdhul Saleem, Nov 23, 2006, in forum: ASP General
    Replies:
    4
    Views:
    425
    Abdhul Saleem
    Nov 27, 2006
Loading...

Share This Page