找回密码
 立即注册

QQ登录

只需一步,快速开始

duyiduo

注册会员

5

主题

6

帖子

77

积分

注册会员

积分
77

活字格认证

duyiduo
注册会员   /  发表于:2016-2-11 17:01  /   查看:3567  /  回复:3
ActiveReports  在 WPF中怎么导出 excel,求列子
还有就是如何在  GrapeCity.ActiveReports.Viewer.Wpf.View.Viewer中  获取  SectionDocument

3 个回复

倒序浏览
Lenka.Guo讲师达人认证 悬赏达人认证
超级版主   /  发表于:2016-2-14 10:34:00
沙发
抱歉,由于放假原因,未能及时回复您;
WPF 中导出Excel 核心代码如下,示例程序见附件 :

  1.   SectionReport1 sc = new SectionReport1();
  2.             sc.Run();
  3.             GrapeCity.ActiveReports.Export.Excel.Section.XlsExport XlsExport1 = new GrapeCity.ActiveReports.Export.Excel.Section.XlsExport();
  4.             XlsExport1.FileFormat = GrapeCity.ActiveReports.Export.Excel.Section.FileFormat.Xlsx;
  5.             XlsExport1.Export(sc.Document, System.IO.Directory.GetCurrentDirectory() + "\\XLSExpt.xlsx"); //导出到Debug目录
  6.             viewer1.LoadDocument(sc);
复制代码

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复 使用道具 举报
duyiduo
注册会员   /  发表于:2016-8-29 11:06:55
板凳
这个方法不具有通用性,
回复 使用道具 举报
Lenka.Guo讲师达人认证 悬赏达人认证
超级版主   /  发表于:2016-8-29 12:10:43
地板
您说的“不通用”具体指的是什么?
您可以参考博客: http://blog.gcpowertools.com.cn/post/2016/07/29/exportreport.aspx;主要讲解了三种报表类型使用Export Filters导出。
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部