有两种方法对gridview进行Excel 输出,一种是gridview 自带的,不用对owc写任何操作,一种是针对microsoft office 的 owc 进行编程。
      
            下面先给出自带的实力,而且这种方法可以实现对gridview完全的打印,也就是说gridview 什么样(颜色,样式)就能打出什么样。

            
    }


            第二种方法就是打印绑定gridview的table,在这里为了节省,我就直接把打印n个表的类写在这了,道理是一样的。注意:其中的表都要有表名,和列的头名。

print gridview to excel and print several tables to excel(one sheet)using System;
print gridview to excel and print several tables to excel(one sheet)
using System.Data;
print gridview to excel and print several tables to excel(one sheet)
using System.Configuration;
print gridview to excel and print several tables to excel(one sheet)
using System.Web;
print gridview to excel and print several tables to excel(one sheet)
using System.Web.Security;
print gridview to excel and print several tables to excel(one sheet)
using System.Web.UI;
print gridview to excel and print several tables to excel(one sheet)
using System.Web.UI.WebControls;
print gridview to excel and print several tables to excel(one sheet)
using System.Web.UI.WebControls.WebParts;
print gridview to excel and print several tables to excel(one sheet)
using System.Web.UI.HtmlControls;
print gridview to excel and print several tables to excel(one sheet)
using System.IO;
print gridview to excel and print several tables to excel(one sheet)
using Excel = Microsoft.Office.Interop.Excel;
print gridview to excel and print several tables to excel(one sheet)




相关文章:

  • 2020-11-08
  • 2021-10-17
  • 2021-11-20
  • 2021-10-16
  • 2021-10-17
  • 2021-10-17
  • 2021-11-03
  • 2021-11-22
猜你喜欢
  • 2021-11-09
  • 2021-09-05
  • 2021-11-27
  • 2021-08-08
  • 2019-01-14
  • 2021-12-14
  • 2018-04-08
相关资源
相似解决方案