Why EXCEL wont Close after use in vb.net
Posted on 2007-03-21
xls will not stop/end after use in vb.net
I have asked this question before but still no answers.
I have an application (vb.net 2005) that use the following I then need to delete after it is finished doing what I am doing.. but I keep getting an error that it is still in use. and when I look at task manager processes there is still an excel app running, even though it is not in the current tasks.
PLEASE HELP HOW DO I REMOVE THE EXCEL FROM THE PROCESS!!!!!!!!!!!!
Imports VBIDE = Microsoft.Vbe.Interop
Dim xlsApp As Excel.Application
Dim xlsWB As Excel.Workbook
Dim xlsSheet As Excel.Worksheet
Dim xlsCell As Excel.Range
xlsApp = New Excel.Application
xlsWB = xlsApp.Workbooks.Open(c:test.xls)
xlsSheet = xlsWB.Worksheets(1)
xlsCell = xlsSheet.Range("A1")
xlsWB = Nothing
xlsApp = Nothing
xlsSheet = Nothing