Quote Originally Posted by jasonli View Post
At the end of program, after everything is done, use Process class to check running process list and find excel to kill it. How do users know that excel application doesn't terminate correctly?

In my program I open excel file and save data in it, just can't terminate the process. It just stays in process list, like a ghost. Very annoying!

My way is just a workaround.
How can you be sure it is that excel process started by your code. ? Very dangerous workaround.
It easily can happen that one wants to terminate your program just while he is doing some other work just in an excel file.
He closes your application and his work in the excel application is also shut down ( withut storing his work in before as it was simple killed

Happy Sunday my dear. No sorry, this is impossible. Two possibilities: A) We have to find why it doesn't correctly close or
b) dont use excel for this job.