From bed09d026a903d4cacd5001c078ff2e94774002c Mon Sep 17 00:00:00 2001 From: Jiaju Zhuang Date: Tue, 21 Feb 2023 11:21:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../alibaba/easyexcel/test/demo/fill/FillTest.java | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/easyexcel-test/src/test/java/com/alibaba/easyexcel/test/demo/fill/FillTest.java b/easyexcel-test/src/test/java/com/alibaba/easyexcel/test/demo/fill/FillTest.java index 3b3c37fc..7023f31f 100644 --- a/easyexcel-test/src/test/java/com/alibaba/easyexcel/test/demo/fill/FillTest.java +++ b/easyexcel-test/src/test/java/com/alibaba/easyexcel/test/demo/fill/FillTest.java @@ -73,18 +73,7 @@ public class FillTest { // 这里 会填充到第一个sheet, 然后文件流会自动关闭 EasyExcel.write(fileName).withTemplate(templateFileName).sheet().doFill(data()); - // 方案2 分多次 填充 会使用文件缓存(省内存) jdk8 - // since: 3.0.0-beta1 - fileName = TestFileUtil.getPath() + "listFill" + System.currentTimeMillis() + ".xlsx"; - EasyExcel.write(fileName) - .withTemplate(templateFileName) - .sheet() - .doFill(() -> { - // 分页查询数据 - return data(); - }); - - // 方案3 分多次 填充 会使用文件缓存(省内存) + // 方案2 分多次 填充 会使用文件缓存(省内存) fileName = TestFileUtil.getPath() + "listFill" + System.currentTimeMillis() + ".xlsx"; try (ExcelWriter excelWriter = EasyExcel.write(fileName).withTemplate(templateFileName).build()) { WriteSheet writeSheet = EasyExcel.writerSheet().build();