easyExcel按模板填充数据,处理模板列表合并问题等,并导出为html,pdf,png等格式文件demo

easyExcel按模板填充数据,处理模板列表合并问题等,并导出为html,pdf,png等格式文件demo

1.工具类

/*** excle模板填充并转换html* * @param response 返回* @param order    主体内容* @param goods    配件列表* @param pro      项目列表* @throws IOException*/public static void moudleExcleToHtml(HttpServletResponse response, String moudleUrl, Object order, List<?> goods,List<?> pro) throws IOException {
//	   response.setContentType("application/vnd.ms-excel");
//       response.setCharacterEncoding("UTF-8");
//       response.setHeader("Content-disposition", "attachment;filename=" +  DateUtil.currentTimeSeconds() + ".xlsx");// 指定excel模板文件
//       String templateFileName = "C:\\Users\\13628\\Desktop\\打印模板.xlsx";
//       ResourceLoader resourceLoader = new DefaultResourceLoader();
//       InputStream templateFileInputStream = resourceLoader.getClassLoader().getResourceAsStream("打印模板.xlsx");URL url = new URL(moudleUrl);I

发布者:admin,转转请注明出处:http://www.yc00.com/web/1701591327a1124939.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信