Releasing Excel From Memory

  • Thread starter Thread starter Atley
  • Start date Start date
A

Atley

I have made an application in VB.net 2003 and in it I create a Excel
Workbook with several spreadsheets in it.

When the code is finished creating the spreadsheets the workbook is saved to
the hard drive and I call: xlbook.Application.Quit but if I go to my Task
Manager and look at Active Processes, there is a listing for Excel for each
and every time I have run my applet.

How do I stop this from happening... also where can i find a difinitive
reference on the net for programming in VB.net for Excel?
 
¤ I have made an application in VB.net 2003 and in it I create a Excel
¤ Workbook with several spreadsheets in it.
¤
¤ When the code is finished creating the spreadsheets the workbook is saved to
¤ the hard drive and I call: xlbook.Application.Quit but if I go to my Task
¤ Manager and look at Active Processes, there is a listing for Excel for each
¤ and every time I have run my applet.
¤
¤ How do I stop this from happening... also where can i find a difinitive
¤ reference on the net for programming in VB.net for Excel?
¤
¤

See the following:

PRB: Office Application Does Not Quit After Automation from Visual Studio .NET Client
http://support.microsoft.com/default.aspx?scid=kb;en-us;317109&Product=vbNET

You may also want to consider the Office PIA depending upon which version you are using:

http://msdn.microsoft.com/library/d.../html/wrrefofficeprimaryinteropassemblies.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnoxpta/html/odc_oxppias.asp


Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 
Same problem here: App.Quit() closes the active window, but Excel stays
in the background. A nasty consequence of this is that when the .net app
crashes (or gets "improperly terminated" :) ) Excel remains in the
background and when you then open Excel manually the workbook-area
doesn't get drawn. If you then don't know how to ctrl-alt-del or don't
have enough system privileges to do so you need to log off and on again
 
* "Atley said:
I have made an application in VB.net 2003 and in it I create a Excel
Workbook with several spreadsheets in it.

When the code is finished creating the spreadsheets the workbook is saved to
the hard drive and I call: xlbook.Application.Quit but if I go to my Task
Manager and look at Active Processes, there is a listing for Excel for each
and every time I have run my applet.

PRB: Office Application Does Not Quit After Automation from Visual Studio .NET Client
<http://support.microsoft.com/?scid=kb;en-us;317109>
 
This works great for VB.Net but not for C#.net
What is the difference

----- Herfried K. Wagner [MVP] wrote: ----

* "Atley said:
I have made an application in VB.net 2003 and in it I create a Exce
Workbook with several spreadsheets in it
the hard drive and I call: xlbook.Application.Quit but if I go to my Tas
Manager and look at Active Processes, there is a listing for Excel for eac
and every time I have run my applet

PRB: Office Application Does Not Quit After Automation from Visual Studio .NET Clien
<http://support.microsoft.com/?scid=kb;en-us;317109
 
Back
Top