当前位置: 首页 > news >正文

手机端网站设计模板济南制作网站软件

手机端网站设计模板,济南制作网站软件,wordpress框架播放器,外包公司劳动合同1 表格行循环 #xff08;1#xff09;需要渲染的表格的模板 说明#xff1a;{{goods}} 是个标准的标签#xff0c;将 {{goods}} 置于循环行的上一行#xff0c;循环行设置要循环的标签和内容#xff0c;注意此时的标签应该使用 [] #xff0c;以此来区别poi-tl的默认标…1 表格行循环 1需要渲染的表格的模板 说明{{goods}} 是个标准的标签将 {{goods}} 置于循环行的上一行循环行设置要循环的标签和内容注意此时的标签应该使用 [] 以此来区别poi-tl的默认标签语法。同理{{labors}} 也置于循环行的上一行。  2定义两个实体类  Data public class Goods {private int count;private String name;private String desc;private int discount;private int tax; }Data public class Labors {private String category;private int people;private int price; } 3测试代码 Testpublic void autoGenerateTable1() throws Exception {// 数据Goods goods1 new Goods();Goods goods2 new Goods();Labors labors1 new Labors();Labors labors2 new Labors();goods1.setCount(2);goods1.setName(商品1);goods1.setDiscount(10);goods1.setDesc(商品1描述);goods1.setTax(5);goods2.setCount(4);goods2.setName(商品2);goods2.setDiscount(20);goods2.setDesc(商品2描述);goods2.setTax(10);ListGoods goodsList Arrays.asList(goods1, goods2);labors1.setPeople(3);labors1.setCategory(类别1);labors1.setPrice(100);labors2.setPeople(1);labors2.setCategory(类别2);labors2.setPrice(200);ListLabors laborList Arrays.asList(labors1, labors2);// 用行循环插件LoopRowTableRenderPolicy renderPolicy new LoopRowTableRenderPolicy();ConfigureBuilder builder Configure.builder();Configure configure builder.bind(goods, renderPolicy).bind(labors, renderPolicy).build();XWPFTemplate template XWPFTemplate.compile(D:\\Idea-projects\\POI_word\\templates_autoGenerateTable.docx,configure);MapString, Object map new HashMap();map.put(goods, goodsList);map.put(labors, laborList);template.render(map);FileOutputStream fileOutputStream new FileOutputStream(D:\\Idea-projects\\POI_word\\output_autoGenerateTable.docx);template.writeAndClose(fileOutputStream);template.close();} 4渲染结果  5测试代码详细解释 2 表格列循环 列循环跟行循环没有什么区别就是将行循环插件换成了列循环插件 1) 模板 2测试代码 Testpublic void autoGenerateTable2() throws Exception {// 数据Labors labors1 new Labors();Labors labors2 new Labors();labors1.setPeople(3);labors1.setCategory(类别1);labors1.setPrice(100);labors2.setPeople(1);labors2.setCategory(类别2);labors2.setPrice(200);ListLabors laborList Arrays.asList(labors1, labors2);// 用列循环插件LoopColumnTableRenderPolicy renderPolicy new LoopColumnTableRenderPolicy();ConfigureBuilder builder Configure.builder();Configure configure builder.bind(labors, renderPolicy).build();XWPFTemplate template XWPFTemplate.compile(D:\\Idea-projects\\POI_word\\templates_autoGenerateTableCol.docx,configure);MapString, Object map new HashMap();map.put(labors, laborList);template.render(map);FileOutputStream fileOutputStream new FileOutputStream(D:\\Idea-projects\\POI_word\\output_autoGenerateTableCol.docx);template.writeAndClose(fileOutputStream);template.close();} 3渲染结果
http://www.hkea.cn/news/14367518/

相关文章:

  • 网站前端设计公司网页设计实验报告结果分析
  • 电商平台建设做网站职友集一家做公司点评的网站
  • 南昌外贸网站建设网络营销外包公司招聘
  • 安阳百度网站制作多少钱邯郸网站制作
  • 微网站制作速成法心理咨询网站模板
  • 哈尔滨网站建设 哈尔滨网站推广通栏网站
  • 做网站l价格平台推广策划案
  • 电子商务网站建设论文3000字写一个app多少钱
  • 北京最大的网站建设有限公司内蒙古微网站建设
  • 哈尔滨市建设安全监察网站电子商务网站需求分析
  • 咸阳做网站的网站 数据备份
  • 怎么做会员自动售卡网站开平网页设计
  • 三亚婚纱摄影 织梦网站源码百度地图添加到网站
  • 做网站小程序多少钱如何做网站页面免费的
  • 网站建设如何描述广告设计与制作网站
  • 怎么在电脑上做网站徐州的网站设计
  • 湖南智能网站建设报价做一份网站动态图多少钱
  • 如何搭建微网站广西长长路桥建设有限公司网站
  • 龙岩网站设计理念手机销售培训网站
  • 常见的网站名称有哪些建设方案模板范文
  • 文库网站开发教程提升审美网站
  • 东莞网站推广设计网页设计与制作基础教程答案
  • 天津特定网站建设推广网站搭建模板素材
  • 合肥网站建设价格青岛seo优化
  • 手机网站活动策划方案传统文化传播公司网站建设
  • 廊坊哪里有做网站的wordpress 添加pdf
  • 动漫网站开发网站app 开发
  • 相亲网站排名前十名开发网址需要多少钱
  • 盆景网站建设swot分析做游戏代练去那个网站
  • 心理服务网站建设内容广东网站建设微信商城开发