In .NET, EXCEL process still alive after quitting.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

In my .NET code behind, I open up an excel file, and process all the rows in
the worksheet that I'm interested in. Problem is when I'm done and issue the
quit method. The EXCEL process still exists in task manager (owner is
ASPNET). Here is the code:

Dim xcl As New Excel.Application
Dim wbk As Excel.Workbook
Dim xs As Excel.Worksheet

wbk = xcl.Workbooks.Open("c:\DwgNumLog1.xls")
xs = CType(wbk.Sheets.Item(2), Excel.Worksheet)

' Do my work on the worksheet
' xcl.Workbooks.Close()

xcl.Quit()
xcl = Nothing

I commented out the workbooks close because it was causing the app to hang,
perhaps if I could execute that command the EXCEL process would close when
the Quit executes. Any ideas would be greatly appreciated!!

Thanks - Hedge
 
Back
Top