From 3b7b6729aa5443ea2d3bc910da887bbd29dae9bf Mon Sep 17 00:00:00 2001 From: Jiaju Zhuang Date: Wed, 18 Mar 2020 00:32:55 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4password=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/alibaba/excel/write/ExcelBuilder.java | 9 -------- .../alibaba/excel/write/ExcelBuilderImpl.java | 21 ------------------- 2 files changed, 30 deletions(-) diff --git a/src/main/java/com/alibaba/excel/write/ExcelBuilder.java b/src/main/java/com/alibaba/excel/write/ExcelBuilder.java index 4ef3b42a..d3a50e35 100644 --- a/src/main/java/com/alibaba/excel/write/ExcelBuilder.java +++ b/src/main/java/com/alibaba/excel/write/ExcelBuilder.java @@ -76,13 +76,4 @@ public interface ExcelBuilder { */ void finish(boolean onException); - /** - * add password - * - * @param data - * @param writeSheet - * @param writeTable - * @param password - */ - void addContent(List data, WriteSheet writeSheet, WriteTable writeTable, String password); } diff --git a/src/main/java/com/alibaba/excel/write/ExcelBuilderImpl.java b/src/main/java/com/alibaba/excel/write/ExcelBuilderImpl.java index e118db4e..0c7158ed 100644 --- a/src/main/java/com/alibaba/excel/write/ExcelBuilderImpl.java +++ b/src/main/java/com/alibaba/excel/write/ExcelBuilderImpl.java @@ -68,9 +68,6 @@ public class ExcelBuilderImpl implements ExcelBuilder { @Override public void fill(Object data, FillConfig fillConfig, WriteSheet writeSheet) { try { - if (data == null) { - return; - } if (context.writeWorkbookHolder().getTempTemplateInputStream() == null) { throw new ExcelGenerateException("Calling the 'fill' method must use a template."); } @@ -99,24 +96,6 @@ public class ExcelBuilderImpl implements ExcelBuilder { } } - @Override - public void addContent(List data, WriteSheet writeSheet, WriteTable writeTable, String password) { - try { - context.currentSheet(writeSheet, WriteTypeEnum.ADD); - context.currentTable(writeTable); - if (excelWriteAddExecutor == null) { - excelWriteAddExecutor = new ExcelWriteAddExecutor(context); - } - excelWriteAddExecutor.add(data); - } catch (RuntimeException e) { - finishOnException(); - throw e; - } catch (Throwable e) { - finishOnException(); - throw new ExcelGenerateException(e); - } - } - @Override public void merge(int firstRow, int lastRow, int firstCol, int lastCol) { CellRangeAddress cra = new CellRangeAddress(firstRow, lastRow, firstCol, lastCol);