110,534
社区成员
发帖
与我相关
我的任务
分享
private void WorkbookSaveAs()
{
if (this.FileFormat == Excel.XlFileFormat.xlWorkbookNormal)
{
this.SaveAs(this.Path + @"\XMLCopy.xls",
Excel.XlFileFormat.xlXMLSpreadsheet, missing, missing,
false, false, Excel.XlSaveAsAccessMode.xlNoChange,
missing, missing, missing, missing, missing);
}
}
# wbook.Save();
# wbook.Close(true, null, null);
# System.Runtime.InteropServices.Marshal.ReleaseComObject(wsheet);
# System.Runtime.InteropServices.Marshal.ReleaseComObject(wbook);
# System.Runtime.InteropServices.Marshal.ReleaseComObject(app);
# wsheet = null;
# wbook = null;
# app = null;
# GC.Collect();