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条)