日期:2014-05-17 浏览次数:20698 次
workBook.SaveAs(filePath, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Excel.XlSaveAsAccessMode.xlExclusive, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing);
appExcel.Quit();
System.Runtime.InteropServices.Marshal.ReleaseComObject((object)appExcel);
System.Runtime.InteropServices.Marshal.ReleaseComObject((object)workBook);
System.Runtime.InteropServices.Marshal.ReleaseComObject((object)workSheet);
System.Runtime.InteropServices.Marshal.ReleaseComObject((object)range);
range = null;
workSheet = null;
workBook = null;
appExcel = null;
GC.Collect(0);