MyException - 我的异常网
当前位置:我的异常网» C# » ?excel.dll 操作excel得通用类,该如何解决

?excel.dll 操作excel得通用类,该如何解决(2)

www.MyException.Cn  网友分享于:2013-12-31  浏览:20次

//调用Excel宏
excel.Workbooks[1].SaveAs(savePath, oMissing, oMissing, oMissing, oMissing, oMissing, Excel.XlSaveAsAccessMode.xlExclusive, oMissing, oMissing, oMissing, oMissing, oMissing);
//保存并关闭
xlWorkbook.Close( Excel.XlSaveAction.xlDoNotSaveChanges, oMissing, oMissing );
System.Runtime.InteropServices.Marshal.ReleaseComObject(xlWorkbook);
xlWorkbook = null;


}
#endregion

文章评论

软件开发程序错误异常ExceptionCopyright © 2009-2015 MyException 版权所有