Closing Excel Application Process in C# after Data Access

The Solution to Closing Excel Application Process in C# after Data Access is


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

Thanks,

~ Answered on 2013-07-21 23:03:42


Most Viewed Questions: