WB.Save(); WB.Close(Type.Missing, Type.Missing, Type.Missing); appold.Quit(); //应用程序推出,但是进程还在运行 appnewbook.Save(); appnewbook.Close(Type.Missing, Type.Missing, Type.Missing); appnew.Quit(); //应用程序推出,但是进程还在运行 System.Runtime.InteropServices.Marshal.ReleaseComObject(worksheet); System.Runtime.InteropServices.Marshal.ReleaseComObject(appnewsheet); System.Runtime.InteropServices.Marshal.ReleaseComObject(WB); System.Runtime.InteropServices.Marshal.ReleaseComObject(appnewbook); System.Runtime.InteropServices.Marshal.ReleaseComObject(appold); System.Runtime.InteropServices.Marshal.ReleaseComObject(appnew);