找回密码
 立即注册

QQ登录

只需一步,快速开始

muhuiru

社区贡献组

65

主题

203

帖子

580

积分

社区贡献组

积分
580

活字格认证

[已处理] 导出world

muhuiru
社区贡献组   /  发表于:2017-2-17 14:25  /   查看:4127  /  回复:6
本帖最后由 Lenka.Guo 于 2017-2-17 16:23 编辑

请给我一个导出world的例子或者教程,谢谢

6 个回复

倒序浏览
Lenka.Guo讲师达人认证 悬赏达人认证
超级版主   /  发表于:2017-2-17 15:20:34
推荐
ExportFilter:
http://blog.gcpowertools.com.cn/post/exportreport.aspx

Rendering to Word
  1. // Provide the page report you want to render
  2. GrapeCity.ActiveReports.PageReport report = new GrapeCity.ActiveReports.PageReport(new System.IO.FileInfo(@"C:\Sample_PageReport.rdlx"));
  3. GrapeCity.ActiveReports.Document.PageDocument reportDocument = new GrapeCity.ActiveReports.Document.PageDocument(report);

  4. // Create an output directory
  5. System.IO.DirectoryInfo outputDirectory = new System.IO.DirectoryInfo(@"C:\MyWord");
  6. outputDirectory.Create();

  7. // Provide settings for your rendering output
  8. GrapeCity.ActiveReports.Export.Word.Page.Settings wordSetting = new GrapeCity.ActiveReports.Export.Word.Page.Settings();

  9. // Set the FileFormat property to .docx
  10. wordSetting.FileFormat = GrapeCity.ActiveReports.Export.Word.Page.FileFormat.OOXML;

  11. //Set the rendering extension and render the report
  12. GrapeCity.ActiveReports.Export.Word.Page.WordRenderingExtension wordRenderingExtension = new GrapeCity.ActiveReports.Export.Word.Page.WordRenderingExtension();
  13. GrapeCity.ActiveReports.Rendering.IO.FileStreamProvider outputProvider = new GrapeCity.ActiveReports.Rendering.IO.FileStreamProvider(outputDirectory, System.IO.Path.GetFileNameWithoutExtension(outputDirectory.Name));
  14. reportDocument.Render(wordRenderingExtension, outputProvider, wordSetting);           
复制代码


回复 使用道具 举报
muhuiru
社区贡献组   /  发表于:2017-2-17 15:51:49
板凳
Lenka.Guo 发表于 2017-2-17 15:20
ExportFilter:
http://blog.gcpowertools.com.cn/post/exportreport.aspx

谢谢,我试试
回复 使用道具 举报
muhuiru
社区贡献组   /  发表于:2017-2-17 15:51:51
地板
Lenka.Guo 发表于 2017-2-17 15:20
ExportFilter:
http://blog.gcpowertools.com.cn/post/exportreport.aspx

谢谢,我试试
回复 使用道具 举报
Lenka.Guo讲师达人认证 悬赏达人认证
超级版主   /  发表于:2017-2-17 15:53:03
5#
ok
回复 使用道具 举报
muhuiru
社区贡献组   /  发表于:2017-2-21 10:18:39
6#
你好,如果我现在有十条数据,要导出,能导出到一个word里吗
回复 使用道具 举报
Richard.Ma讲师达人认证 悬赏达人认证 SpreadJS 开发认证
超级版主   /  发表于:2017-2-21 17:49:18
7#
已在另一个帖子回复
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部