本文介绍了如何以ediatable格式保存excel工作簿?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前我以编程方式保存工作簿。然后在应用程序外部打开它,并在进行一些更改后尝试保存。我被要求另存为。







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工作簿?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-11 07:44