计算机与现代化

• 应用与开发 • 上一篇    下一篇

FreeMarker模板引擎在线动态生成Excel和Word文档技术

  

  1. (新疆农业大学计算机与信息工程学院,新疆乌鲁木齐830052)

  • 收稿日期:2015-11-11 出版日期:2016-04-14 发布日期:2018-09-30
  • 作者简介:王正敏(1990-),男,四川南充人,新疆农业大学计算机与信息工程学院硕士研究生,研究方向:数据库; 张太红(1965-),男,甘肃静宁人,教授,研究方向:数据库,农业信息化; 李永可(1985-),男,河南许昌人,讲师,研究方向:数据库; 白涛(1979-),男,甘肃兰州人,讲师,研究方向:复杂网络,数据挖掘。
  • 基金资助:

    库尔勒市重点科技项目(2013ku02; 新疆维吾尔自治区高技术研究发展计划项目(2015X0103)

FreeMarker Template Engine Online Dynamically Generating Excel and Word Files Technology

  1. (College of Computer & Information Engineering, Xinjiang Agricultural University, Urumqi 830052, China)

  • Received:2015-11-11 Online:2016-04-14 Published:2018-09-30

摘要: 由于Java生成Word和Excel文档十分困难且代码量也比较大,本文提出FreeMarker模板引擎在线动态生成Excel和Word文档的方案,并把相关技术应用到库尔勒科技服务平台,经过实践证明,该方案生成的Word和Excel文档符合Office标准,打印也不会变形,是当前用来生成具有固定结构的Excel和Word文档的较佳方案。

关键词:

text-indent: 21pt">Word, Excel, FreeMarker, Java, mso-ascii-font-family: 'Times New Roman', mso-hansi-font-family: 'Times New Roman'">模板

Abstract:

Because Java is very difficult to generate Word and Excel except for the relatively large amount of codes. This paper presents a FreeMarker template engines dynamically generating online Excel and Word scheme. And the related technology is applied to Korla technology service platform. Practice has proved that Word and Excel files generated by the program met Office standards and print would not be deformed. Currently, it is the best solution to generate a fixed structure of Excel and Word files.



Key words: Word, Excel, FreeMarker, Java, template

中图分类号: