Excel cannot exit until all its objects outside the process are released. Thus, it just hides its user interface and continues to work. Until your program terminates or removes all references to Excel objects and the finalizer stream. Exiting your program will be the obvious decision. Or you can make the finalizer thread work with:
GC.Collect(); GC.WaitForPendingFinalizers();
ReleaseComObject () rarely works because it is so easy to forget the intermediate link of a COM object. Like WorkBooks [index], you do not see this counter. Providing GK with such a solution would be a more reasonable choice for yourself, if you continue to work and do the work, then this will happen.
Hans passant
source share