Browse Source

移除password方法

2.1.x
Jiaju Zhuang 5 years ago
parent
commit
3b7b6729aa
  1. 9
      src/main/java/com/alibaba/excel/write/ExcelBuilder.java
  2. 21
      src/main/java/com/alibaba/excel/write/ExcelBuilderImpl.java

9
src/main/java/com/alibaba/excel/write/ExcelBuilder.java

@ -76,13 +76,4 @@ public interface ExcelBuilder {
*/ */
void finish(boolean onException); void finish(boolean onException);
/**
* add password
*
* @param data
* @param writeSheet
* @param writeTable
* @param password
*/
void addContent(List data, WriteSheet writeSheet, WriteTable writeTable, String password);
} }

21
src/main/java/com/alibaba/excel/write/ExcelBuilderImpl.java

@ -68,9 +68,6 @@ public class ExcelBuilderImpl implements ExcelBuilder {
@Override @Override
public void fill(Object data, FillConfig fillConfig, WriteSheet writeSheet) { public void fill(Object data, FillConfig fillConfig, WriteSheet writeSheet) {
try { try {
if (data == null) {
return;
}
if (context.writeWorkbookHolder().getTempTemplateInputStream() == null) { if (context.writeWorkbookHolder().getTempTemplateInputStream() == null) {
throw new ExcelGenerateException("Calling the 'fill' method must use a template."); 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 @Override
public void merge(int firstRow, int lastRow, int firstCol, int lastCol) { public void merge(int firstRow, int lastRow, int firstCol, int lastCol) {
CellRangeAddress cra = new CellRangeAddress(firstRow, lastRow, firstCol, lastCol); CellRangeAddress cra = new CellRangeAddress(firstRow, lastRow, firstCol, lastCol);

Loading…
Cancel
Save