做了一个对页面的四张表单保存到Excel中的四个Sheet中,并提供下载 , 本来想在客户端完成操作, 实在没想出来好的解决办法,如果谁有请告诉我, 我实现了先把形成的Excel生成并保存到服务器端,当然服务器端要进行一些配置,允许客户端对服务器端保存Excel。服务器用的是win2003,打开管理中的组件服务,找到DCOM配置 --> Microsoft Excel 应用程序 -- > 属性 ,对访问权限进行自定义配置,添加EveryOne用户,给予全部权限。

            下面给出相应的页面部分代码,和download类和SaveExcel类。

#endregion


save tables to excel sheets class and down load classusing System;
save tables to excel sheets class and down load class
using System.Data;
save tables to excel sheets class and down load class
using System.Configuration;
save tables to excel sheets class and down load class
using System.Web;
save tables to excel sheets class and down load class
using System.Web.Security;
save tables to excel sheets class and down load class
using System.Web.UI;
save tables to excel sheets class and down load class
using System.Web.UI.WebControls;
save tables to excel sheets class and down load class
using System.Web.UI.WebControls.WebParts;
save tables to excel sheets class and down load class
using System.Web.UI.HtmlControls;
save tables to excel sheets class and down load class
using System.IO;
save tables to excel sheets class and down load class
using System.Threading;
save tables to excel sheets class and down load class



save tables to excel sheets class and down load classusing System;
save tables to excel sheets class and down load class
using System.Data;
save tables to excel sheets class and down load class
using System.Configuration;
save tables to excel sheets class and down load class
using System.Web;
save tables to excel sheets class and down load class
using System.Web.Security;
save tables to excel sheets class and down load class
using System.Web.UI;
save tables to excel sheets class and down load class
using System.Web.UI.WebControls;
save tables to excel sheets class and down load class
using System.Web.UI.WebControls.WebParts;
save tables to excel sheets class and down load class
using System.Web.UI.HtmlControls;
save tables to excel sheets class and down load class
using System.IO;
save tables to excel sheets class and down load class
using Excel = Microsoft.Office.Interop.Excel;
save tables to excel sheets class and down load class
                        




 

相关文章:

  • 2022-12-23
  • 2021-07-20
  • 2021-11-28
  • 2022-01-22
  • 2021-12-06
猜你喜欢
  • 2021-11-18
  • 2021-10-20
  • 2021-09-13
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案