Closing Excel Application Process in C# after Data Access

Try this:

excelBook.Close(0); 
excelApp.Quit();

When closing the work-book, you have three optional parameters:

Workbook.close SaveChanges, filename, routeworkbook 

Workbook.Close(false) or if you are doing late binding, it sometimes is easier to use zero
Workbook.Close(0)
That is how I’ve done it when automating closing of workbooks.

Also I went and looked up the documentation for it, and found it here:
Excel Workbook Close

Leave a Comment