1、项目中,引用添加office COM组件

3、在程序中 添加代码[DllImport("User32.dll"挢旗扦渌;, CharSet = CharSet.Auto)]public static extern int GetWindowThreadProcessId(IntPtr hwnd, out int ID);

5、立即结束Excel进程

时间:2024-10-14 13:38:07
1、项目中,引用添加office COM组件
3、在程序中 添加代码[DllImport("User32.dll"挢旗扦渌;, CharSet = CharSet.Auto)]public static extern int GetWindowThreadProcessId(IntPtr hwnd, out int ID);
5、立即结束Excel进程