我的程序是在服务器端new一个EXCEL,用完后关闭,可是怎么也关不掉打开的EXCEL进程,请问该怎么关闭?我试了很多方法,连
myExcel.Quit();
System.Runtime.InteropServices.Marshal.ReleaseComObject (myExcel);
myExcel = null;GC.Collect();
GC.WaitForPendingFinalizers();
等方法都用了,可还是关不掉啊,郁闷死了。请高手帮帮忙吧
myExcel.Quit();
System.Runtime.InteropServices.Marshal.ReleaseComObject (myExcel);
myExcel = null;GC.Collect();
GC.WaitForPendingFinalizers();
等方法都用了,可还是关不掉啊,郁闷死了。请高手帮帮忙吧
foreach(Process myprocess in myprocesses)
myprocesses[0].Kill();
其他方法我以前也用过,没有办法结束EXCEL.EXE进程。
to shaofengli(懒懒),这方面的资料很难找啊,我把所有用到的range,sheet,workbook都用ReleaseComObject()方法释放掉了啊,难道还有什么要释放的?