File to createobject. 'Excel.Application'

Discussion in 'ASP General' started by Sze, Jul 28, 2010.

  1. Sze

    Sze Guest

    My web application works fine in my PC and create the excel sucessfully.
    However, When I publish to the client server (Didn't got MS office), It
    seems can't create excel .
    Is that true ?


    My Code is
    Dim oSheet As Object
    oExcel = Server.CreateObject("Excel.Application")
    oBook = oExcel.Workbooks.Add

    The error show as below :-
    System.Web.HttpException: Could not create an object of type
    'Excel.Application'.
    Sze, Jul 28, 2010
    #1
    1. Advertising

  2. Sze

    Steven Cheng Guest

    Hi Sze,

    Regarding on the issue, you are trying to deploy a web application that
    contains code for creating Excel objects to another new server and found it
    not work, correct?

    As you mentioned that "Didn't got MS office", do you mean the new
    deployment server doesn't have Office /Excel application installed? If this
    is the case, I'm afraid the Excel object creation code you used will not
    work since such kind of Office Automation code requires the Office
    application be installed on the hosting system.

    BTW, you use the Office automation code in web application, and this is not
    recommended since using Office automation code in server-side application
    might cause performance issue and unexpected error behavior. If your web
    application will be accessed by large number of concurrent users, this is
    really a big potential issue.

    #Considerations for server-side Automation of Office
    http://support.microsoft.com/kb/257757

    Sincerely,

    Steven Cheng

    Microsoft MSDN Online Support Lead


    --------------------
    >From: "Sze" <>
    >Subject: File to createobject. 'Excel.Application'
    >Date: Wed, 28 Jul 2010 10:35:44 +0800
    >
    >My web application works fine in my PC and create the excel sucessfully.
    >However, When I publish to the client server (Didn't got MS office), It
    >seems can't create excel .
    >Is that true ?
    >
    >
    >My Code is
    > Dim oSheet As Object
    > oExcel = Server.CreateObject("Excel.Application")
    > oBook = oExcel.Workbooks.Add
    >
    >The error show as below :-
    > System.Web.HttpException: Could not create an object of type
    >'Excel.Application'.
    >
    >
    >
    >
    Steven Cheng, Jul 28, 2010
    #2
    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. Raúl Martín
    Replies:
    1
    Views:
    10,776
    Natty Gur
    May 13, 2004
  2. KC
    Replies:
    1
    Views:
    4,643
    Ken Cox [Microsoft MVP]
    Oct 5, 2004
  3. POLILOP

    CreateObject("Excel.Sheet") error

    POLILOP, Nov 11, 2005, in forum: ASP General
    Replies:
    2
    Views:
    377
    Tom Kaminski [MVP]
    Nov 11, 2005
  4. ashish
    Replies:
    1
    Views:
    422
    ashish
    Aug 14, 2007
  5. Sagar

    Server.CreateObject Vs CreateObject

    Sagar, Jan 15, 2008, in forum: ASP General
    Replies:
    2
    Views:
    323
    Sagar
    Jan 15, 2008
Loading...

Share This Page