1.工具類文章來源地址http://www.zghlxwxcb.cn/news/detail-719806.html
/**
* excle模板填充并轉(zhuǎn)換html
*
* @param response 返回
* @param order 主體內(nèi)容
* @param goods 配件列表
* @param pro 項(xiàng)目列表
* @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
文章來源:http://www.zghlxwxcb.cn/news/detail-719806.html
到了這里,關(guān)于easyExcel按模板填充數(shù)據(jù),處理模板列表合并問題等,并導(dǎo)出為html,pdf,png等格式文件demo的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!