问题描述
目前我以编程方式保存工作簿。然后在应用程序外部打开它,并在进行一些更改后尝试保存。我被要求另存为。
Microsoft.Office.Interop.Excel.Workbook l_objExcelworkBook;
l_objExcelworkBook.SaveAs( c:\\test,Microsoft.Office.Interop.Excel.XlFileFormat.xlWorkbookDefault,Type.Missing,Type.Missing,
false,false,Microsoft.Office.Interop.Excel.XlSaveAsAccessMode .xlNoChange,
Type.Missing,Type.Missing,Type.Missing,Type.Missing,Type.Missing);
Currently when I save the workbook programmatically.And then open it outside the application and try to save it after making some changes .I'm asked to Save As.
Microsoft.Office.Interop.Excel.Workbook l_objExcelworkBook;
l_objExcelworkBook.SaveAs("c:\\test", Microsoft.Office.Interop.Excel.XlFileFormat.xlWorkbookDefault, Type.Missing, Type.Missing,
false, false, Microsoft.Office.Interop.Excel.XlSaveAsAccessMode.xlNoChange ,
Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing);
推荐答案
l_objExcelworkBook.SaveAs("c:\\test", Microsoft.Office.Interop.Excel.XlFileFormat.xlWorkbookDefault,
Type.Missing, Type.Missing, false, false, Microsoft.Office.Interop.Excel.XlSaveAsAccessMode.xlExclusive ,
Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing);
应该可以正常工作。
Should work nicely.
这篇关于如何以ediatable格式保存excel工作簿?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!