freemarker 使用word模版導出word

創建一個word.doc,如下圖: 另存爲XML格式,如下圖: 將word.xml放入項目中,重命名爲word.ftl,(list循環數據格式需要修正) Configuration cfg=new Configuration(); cfg.setClassForTemplateLoading(FreeMarkerUtil.class,"/template"); cfg.setDefaultEnco
相關文章
相關標籤/搜索