winform中怎樣關閉Excel進程(C#)? Process[] allExcel = Process.GetProcessesByName("EXCEL"); for(int i = 0; i < allExcel.Length; i++) { allExcel[i].Kill(); } 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 清掉Excel进程http://expert.csdn.net/Expert/FAQ/FAQ_Index.asp?id=7099 System.Runtime.InteropServices.Marshal.ReleaseComObject(sheets); System.Runtime.InteropServices.Marshal.ReleaseComObject(workbooks); System.Runtime.InteropServices.Marshal.ReleaseComObject(app); app.Quit(); app=null; System.GC.Collect(); System.Runtime.InteropServices.Marshal.ReleaseComObject(excelApp); radiobutton使用 界面中重复使用一个调用的DLL文件报错! 求救!!!! socket异步发送信息报错,什么原因? 如何取得gridview的某一列的值 为什么第一次切换DataTable的DefaultView的RowFilter时速度非常慢? c#计算器问题 为什么我的程序生成的.EXE文件不能单独运行??? c#中如何对Excel文件中的不同sheet进行操作 有谁知道C#怎么连接phpMyAdmin数据库? Requst.QueryString[]如何传递中文? (百分求救解决问题就给分)怎样结束EXCEL线程 菜单项
http://expert.csdn.net/Expert/FAQ/FAQ_Index.asp?id=7099
System.Runtime.InteropServices.Marshal.ReleaseComObject(workbooks);
System.Runtime.InteropServices.Marshal.ReleaseComObject(app);
app.Quit();
app=null;
System.GC.Collect();