In .NET, EXCEL process still alive after quitting.

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top