I have written an application that exports data from SQL to Excel.
It all works perfectly except that if you open the Task Manager after
running my application, there is an instance of Excel in the list for each
time the extract has been run.
I cannot seem to find anything on this, I have the application closing
properly as far as I can see, but it is staying in the process table and the
only way to get rid of it is to either reboot the machine or open the taks
manger and remove each process individually neither of which is acceptable.
here is my Excel closing code, what am I doing incorrectly here?
xlBook.Application.Visible = False
xlBook.SaveAs(MyFileName)
xlBook.Application.Quit()
xlBook = Nothing
xlApp = Nothing
any help is greatly appreciated...
Thanks