G
Guest
Hi
I am using VB.NET and Office 2003. I have written a small
program, which creats an excel application and writes teh
data into the sheet and the closes the application. But
when i go to the task manager, I can still see the
excel.exe running there.
Plese help me
The code I am using is :
Dim Excel As New Excel.ApplicationClass
' Get a new workbook
Dim oBook As Excel._Workbook = CType
(Excel.Workbooks.Add(oTemplate), Excel._Workbook)
....
...
oBook.SaveAs("c:\SearchResults.xls")
Excel.ActiveWorkbook.Close(False)
System.Runtime.InteropServices.Marshal.ReleaseComObject
(oBook) ' releases the workbook object
oBook = Nothing
Excel.Quit()
System.Runtime.InteropServices.Marshal.ReleaseComObject
(Excel) ' releases the excel object
Excel = Nothing
Thanks Vishal
I am using VB.NET and Office 2003. I have written a small
program, which creats an excel application and writes teh
data into the sheet and the closes the application. But
when i go to the task manager, I can still see the
excel.exe running there.
Plese help me
The code I am using is :
Dim Excel As New Excel.ApplicationClass
' Get a new workbook
Dim oBook As Excel._Workbook = CType
(Excel.Workbooks.Add(oTemplate), Excel._Workbook)
....
...
oBook.SaveAs("c:\SearchResults.xls")
Excel.ActiveWorkbook.Close(False)
System.Runtime.InteropServices.Marshal.ReleaseComObject
(oBook) ' releases the workbook object
oBook = Nothing
Excel.Quit()
System.Runtime.InteropServices.Marshal.ReleaseComObject
(Excel) ' releases the excel object
Excel = Nothing
Thanks Vishal