摘要: 在Web系统中调用Excel操作后,关闭Excel进程是个老问题试了几种方法都无效,最后还是得采用kill进程的方案,不过跟强行kill所有Excel进程相比,下面的方案更为合理。程序只kill当前对象相应的Excel进程。[DllImport("user32.dll",SetLastError=true)]staticexternintGetWindowThreadProcessId(IntPtrhWnd,outintlpdwProcessId);intlpdwProcessId;GetWindowThreadProcessId(newIntPtr(app.Hwnd),o 阅读全文
posted @ 2011-10-31 00:00 Allen Zhang 阅读(336) 评论(0) 推荐(0) 编辑