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