用sl导出excel,打开模板的时候我是这样写的dynamic excel = AutomationFactory.CreateObject("Excel.Application");
excel = File.OpenWrite("/Template/课题项目到款汇总.xls");提示错误:
{System.Security.SecurityException: 不允许进行文件操作。拒绝访问路径“/Template/课题项目到款汇总.xls”。
   位于 System.IO.FileSecurityState.EnsureState()
   位于 System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   位于 System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   位于 System.IO.File.OpenWrite(String path)
   位于 CNZH.SL.Common.ExportExcel.ExportToExcel(String FileName, List`1 DataList, String[] parms)
   位于 CNZH.SL.Views.ProduceProjectSummary.button1_Click(Object sender, RoutedEventArgs e)
   位于 System.Windows.Controls.Primitives.ButtonBase.OnClick()
   位于 System.Windows.Controls.Button.OnClick()
   位于 System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
   位于 System.Windows.Controls.Control.OnMouseLeftButtonUp(Control ctrl, EventArgs e)
   位于 MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName)}
请问如何解决?还是我写的不对?请大虾们指教,注意,是OOB,不是web