xBk.Close(false, Type.Missing, Type.Missing);
        excel.Quit();
        System.Runtime.InteropServices.Marshal.ReleaseComObject(xBk);   //释放工作表   
        System.Runtime.InteropServices.Marshal.ReleaseComObject(xSt);
        System.Runtime.InteropServices.Marshal.ReleaseComObject(excel);
        xSt = null;
        excel = null;
        xBk = null;
        GC.Collect();

相关文章:

  • 2022-03-04
  • 2021-07-30
  • 2022-12-23
  • 2021-12-30
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-01-21
  • 2021-06-09
  • 2022-02-12
相关资源
相似解决方案