📜  互操作 C# 另存为和替换 - C# 代码示例

📅  最后修改于: 2022-03-11 14:48:53.595000             🧑  作者: Mango

代码示例1
//So you can do this to stop DisplayAlerts from appearing:

myApp.DisplayAlerts = false;

//And then if you want to save with specifying a file name, you can do this:
//specifying a file name
myWorkSheet.SaveAs(filename, Microsoft.Office.Interop.Excel.XlFileFormat.xlWorkbookDefault, Type.Missing, Type.Missing, true, false, XlSaveAsAccessMode.xlNoChange, XlSaveConflictResolution.xlLocalSessionChanges, Type.Missing, Type.Missing);
myWorkBook.Close(true);