Housekpng w/ Excel

Discussion in 'ASP .Net' started by nikedog@msu.edu, Nov 5, 2003.

  1. Guest

    I realize that xl won't scale; this is only to import
    legacy data into sql server.

    My problem is that Excel stays resident in memory after
    the following code.

    I've tried many combinations but everything leaves Excel
    (running under the ASPNET user) as a process running

    Any advice suggestions, please.


    Imports System.Runtime.InteropServices.Marshal


    Dim oXL As Excel.Application
    Dim oWorkbook As Excel.Workbook
    Dim oWorksheet As Excel.Worksheet

    oXL = New Excel.Application
    oXL.Visible = False
    oXL.Workbooks.Open(sFid)
    oWorkbook = oXL.ActiveWorkbook

    ' Process reading xl file only here

    oXL.Quit()
    ReleaseComObject(oWorksheet)
    ReleaseComObject(oWorkbook)
    ReleaseComObject(oXL)
    oWorksheet = Nothing
    oWorkbook = Nothing
    oXL = Nothing
    System.GC.Collect()
     
    , Nov 5, 2003
    #1
    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. =?Utf-8?B?SmltIEhlYXZleQ==?=

    Excel _WorkBook vs. Excel.Workbook

    =?Utf-8?B?SmltIEhlYXZleQ==?=, Sep 29, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    3,677
    Steve C. Orr [MVP, MCSD]
    Sep 29, 2004
  2. Luis Esteban Valencia
    Replies:
    1
    Views:
    1,419
    Carl Prothman [MVP]
    Jan 12, 2005
  3. =?Utf-8?B?U3JpZGhhcg==?=

    using Microsoft Excel image for Export to Excel button

    =?Utf-8?B?U3JpZGhhcg==?=, Dec 9, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    3,149
    =?Utf-8?B?U3JpZGhhcg==?=
    Dec 9, 2005
  4. Anonieko
    Replies:
    2
    Views:
    7,354
    JackStraw73
    Feb 12, 2008
  5. =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?=

    Problem with Excel reports ::::Excel 2003 Migration To Excel 2007

    =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?=, Oct 5, 2007, in forum: ASP .Net
    Replies:
    15
    Views:
    1,573
    =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?=
    Oct 24, 2007
Loading...

Share This Page