加好友 发短信
等级:五尾狐
帖子:1107
积分:10568
威望:0
精华:0
注册:2014/2/19 16:32:00
|
如何在不关闭程序的情况下释放EXCEL Post By:2017/2/6 17:54:00 [只看该作者]
- 下列代码第3行-第7行代码在狐表中好像不支持,转换成狐表的代码应该如何写?
-
- System.Runtime.InteropServices.Marshal.ReleaseComObject(rng);
- System.Runtime.InteropServices.Marshal.ReleaseComObject(ws);
- System.Runtime.InteropServices.Marshal.ReleaseComObject(wb);
- System.Runtime.InteropServices.Marshal.ReleaseComObject(wbs);
- System.Runtime.InteropServices.Marshal.ReleaseComObject(excelApp);
-
-
- GC.Collect();
- GC.WaitForPendingFinalizers();
|
|