+ Reply to Thread
Results 1 to 3 of 3

Excel Instance is not killed from clasic asp

  1. #1
    RameshMarimuthu
    Guest

    Excel Instance is not killed from clasic asp

    We had developed many Excel Reports calling from asp. We had deployed all
    Business components in com+ server which includes Server side office
    automation code . After requesting the excel report from the browser, the
    Excel instance is not getting killed. Due to this, after time we have been
    fored to restart the server.

    But the same code is working fine in our development environment.

    I have temp. found a solution which will kill all excel instances every five
    mts, but I would like to give stable solution for them.

    please let me what could be the problem and which is the best way to solve
    this.

    Cheers

    RameshMarimuthu

  2. #2
    Jim Cone
    Guest

    Re: Excel Instance is not killed from clasic asp

    Hello,

    Have you reviewed this MS article?...
    Info: Considerations For Server-Side Automation Of Office
    http://support.microsoft.com/default...b;en-us;257757


    Although, I wouldn't know an Active Server Page from an inactive one,
    maybe the following will be of some help...
    '-------------------------------------------------------------
    'Jim Cone - May 2002
    Here are some general guidelines to use when automating Excel...

    1. Set a reference to the primary Excel objects used in your program.
    Dim xlApp As Excel.Application
    Dim WB As Excel.Workbook
    Dim WS As Excel.Worksheet

    Set xlApp = New Excel.Application
    Set WB = xlApp.Workbooks.Add
    Set WS = WB.Sheets(1)

    Use the appropriate reference Every Time you make reference to a spreadsheet.
    Do not use Range(xx) - use WS.Range(xx)
    Cells should be WS.Cells(10, 20) or _
    WS.Range(WS.Cells(10, 20), WS.Cells(20, 40))

    2. Avoid the use of ActiveSheet, ActiveWorkbook, Selection etc.
    Use your object references.

    3. Avoid the use of the "With" construct.

    4. Set all objects to Nothing in the proper order - child then parent.
    Set WS = Nothing
    WB.Close SaveChanges:=True 'your choice
    Set WB = Nothing
    xlApp.Quit
    Set xlApp = Nothing

    Violating any of these guidelines can leave "orphans" that still refer
    to Excel and prevent the application from closing.
    '------------------------------------------------------------

    Regards,
    Jim Cone
    San Francisco, USA



    "RameshMarimuthu" <[email protected]> wrote in message
    news:[email protected]...
    > We had developed many Excel Reports calling from asp. We had deployed all
    > Business components in com+ server which includes Server side office
    > automation code . After requesting the excel report from the browser, the
    > Excel instance is not getting killed. Due to this, after time we have been
    > fored to restart the server.
    > But the same code is working fine in our development environment.
    > I have temp. found a solution which will kill all excel instances every five
    > mts, but I would like to give stable solution for them.
    > please let me what could be the problem and which is the best way to solve
    > this.
    > Cheers
    > RameshMarimuthu


  3. #3
    zino
    Guest

    Re: Excel Instance is not killed from clasic asp


    try :
    http://www.codeproject.com/useritems...xcelObject.asp

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1