进程没有完全关闭
app.Quit();//好像后面还有参数的吧,好久不写了,不能确定

解决方案 »

  1.   

    我用Winform编的时候,关闭我的程序,Excel进程还能够正常关闭,但是我用asp.net调用的时候就没有办法关闭了,郁闷中.............大家想办法啊
      

  2.   

    app.Workbooks[1]=null;
    app.Workbooks.Close();
    app.Workbooks=null;
    myApp.Quit(ref Nothing, ref Nothing, ref Nothing);
      

  3.   

    chsfly(一蓑烟雨任平生) 你的答案是不对地
      

  4.   

    下面这样写都不行,俺要哭了 private void button1_Click(object sender, System.EventArgs e)
    {
    this.app=new Excel.Application();

    } private void button2_Click(object sender, System.EventArgs e)
    {
    this.app.Quit();//不好用啊!!!
    }
      

  5.   

    // app.Quit();System.Runtime.InteropServices.Marshal.ReleaseComObject(r1);
    System.Runtime.InteropServices.Marshal.ReleaseComObject(r2);
    System.Runtime.InteropServices.Marshal.ReleaseComObject(app);r1 = null;
    r2 = null;
    app = null;GC.Collect();return dt;
      

  6.   

    http://blog.csdn.net/ac669/archive/2005/01/22/263670.aspx看看这个吧。
      

  7.   

    感谢 iYoung() 啦,果然有效果,我会把大部分的分都给你,当然了,其他朋友也有分的。