From d1ba5faaf2992909be3858fb7e02d61cd3f7f548 Mon Sep 17 00:00:00 2001 From: chenrui Date: Thu, 1 Aug 2024 20:33:31 +0800 Subject: [PATCH] =?UTF-8?q?---author:chenrui---date:2024/8/1-----for:[issu?= =?UTF-8?q?es/6925]xlsx=E6=A8=A1=E7=89=88=E5=AF=BC=E5=87=BA=E5=9B=BE?= =?UTF-8?q?=E7=89=87---?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../excel/export/template/ExcelExportOfTemplateUtil.java | 5 +++++ "docs/\344\277\256\346\224\271\346\227\245\345\277\227.log" | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/autopoi/src/main/java/org/jeecgframework/poi/excel/export/template/ExcelExportOfTemplateUtil.java b/autopoi/src/main/java/org/jeecgframework/poi/excel/export/template/ExcelExportOfTemplateUtil.java index 3a805f1..8a13dea 100644 --- a/autopoi/src/main/java/org/jeecgframework/poi/excel/export/template/ExcelExportOfTemplateUtil.java +++ b/autopoi/src/main/java/org/jeecgframework/poi/excel/export/template/ExcelExportOfTemplateUtil.java @@ -167,6 +167,11 @@ public Workbook createExcleByTemplate(TemplateExportParams params, Class pojo // 创建表格样式 setExcelExportStyler((IExcelExportStyler) teplateParams.getStyle().getConstructor(Workbook.class).newInstance(wb)); // step 3. 解析模板 + //update-begin---author:chenrui ---date:20240801 for:[issues/6925]xlsx模版导出图片------------ + if (wb instanceof XSSFWorkbook) { + super.type = ExcelType.XSSF; + } + //update-end---author:chenrui ---date:20240801 for:[issues/6925]xlsx模版导出图片------------ for (int i = 0, le = params.isScanAllsheet() ? wb.getNumberOfSheets() : params.getSheetNum().length; i < le; i++) { if (params.getSheetName() != null && params.getSheetName().length > i && StringUtils.isNotEmpty(params.getSheetName()[i])) { wb.setSheetName(i, params.getSheetName()[i]); diff --git "a/docs/\344\277\256\346\224\271\346\227\245\345\277\227.log" "b/docs/\344\277\256\346\224\271\346\227\245\345\277\227.log" index ed3393b..ae0178a 100644 --- "a/docs/\344\277\256\346\224\271\346\227\245\345\277\227.log" +++ "b/docs/\344\277\256\346\224\271\346\227\245\345\277\227.log" @@ -81,4 +81,8 @@ autopoi\src\main\java\org\jeecgframework\poi\excel\imports\CellValueServer.java src\test\resources\templates\ExcelImportDateTest.xlsx src\test\java\TestDateEntity.java src\test\java\ImportExcelTest.java ----author:liusq---date:2024/7/30-----for:TV360X-1292 对象的属性为LocalDate、LocalDateTIme类型对象兼容--- \ No newline at end of file +---author:liusq---date:2024/7/30-----for:TV360X-1292 对象的属性为LocalDate、LocalDateTIme类型对象兼容--- + +---author:chenrui---date:2024/8/1-----for:[issues/6925]xlsx模版导出图片--- +src/main/java/org/jeecgframework/poi/excel/export/template/ExcelExportOfTemplateUtil.java +---author:chenrui---date:2024/8/1-----for:[issues/6925]xlsx模版导出图片--- \ No newline at end of file