Closing or ending a process
-
I have opened a Excel spreadsheet with c# by using the Excel.Application class. After I have closed the excel file in windows by clicking on the X in the upper right hand corner, the process EXCEL.EXE stil remains.???
Did you click on X of the main form or just close a document ? << >>
-
Did you click on X of the main form or just close a document ? << >>
-
Did you click on X of the main form or just close a document ? << >>
-
Hello, Please try to do this in
Closing
event of the main form.if(excelApplication != null && excelApplication.Workbooks.Count > 0) { foreach(Workbook wb in excelApplication.Workbooks) { wb.Close(false,Type.Missing,Type.Missing); } excelApplication.Quit(); excelApplication.Visible = false; }
whereexcelApplication
is anExcel.ApplicationClass
object. HTH. Cheers :) Maqsood Ahmed - MCAD.net Kolachi Advanced Technologies http://www.kolachi.net -
lol, OK ... Happy Coding :rose: << >>