Excel.exe process cannot quit after operated Excel in C#、Java、VB、VC、Delphi

Posted by NosaLee in Common Programming on 08-04-2012.

Author: Nosa Lee
Original Address: http://www.seeksunslowly.com/excel-exe-not-quit
To reprint this article, please indicate the source, thank you.
_____________________________________

In most programming languages, after operated Excel (by Object) and called workbook.Close() & excel.Quit(), the excel.exe process (maybe) still exist.

This is not a fatal problem, but looks at really awkward.

There are some people said that “just kill them!” in the Internet, but I think it is not applicable: because the user may open Excel manually and it is in use. If you want to decide which are opened by your program, which are opened by the user manually, I think that is very troublesome, and uneconomical.

After my observation and testing, I found the solution is very easy: just ignore it!
Because after operated Excel (by Object) and called workbook.Close() & excel.Quit(), though excel.exe process is still existing, but it is not working, once exit the calling program, whole excel.exe processes will exit automatically.

Post a comment