|
|
@ -66,7 +66,6 @@ public class ExcelWriterBuilder extends AbstractExcelWriterParameterBuilder<Exce |
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public ExcelWriterBuilder excelType(ExcelTypeEnum excelType) { |
|
|
|
public ExcelWriterBuilder excelType(ExcelTypeEnum excelType) { |
|
|
|
writeWorkbook.setExcelType(excelType); |
|
|
|
writeWorkbook.setExcelType(excelType); |
|
|
|
return this; |
|
|
|
return this; |
|
|
@ -95,21 +94,32 @@ public class ExcelWriterBuilder extends AbstractExcelWriterParameterBuilder<Exce |
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Template file. |
|
|
|
|
|
|
|
* This file is read into memory, excessive cases can lead to OOM. |
|
|
|
|
|
|
|
*/ |
|
|
|
public ExcelWriterBuilder withTemplate(InputStream templateInputStream) { |
|
|
|
public ExcelWriterBuilder withTemplate(InputStream templateInputStream) { |
|
|
|
writeWorkbook.setTemplateInputStream(templateInputStream); |
|
|
|
writeWorkbook.setTemplateInputStream(templateInputStream); |
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Template file. |
|
|
|
|
|
|
|
* This file is read into memory, excessive cases can lead to OOM. |
|
|
|
|
|
|
|
*/ |
|
|
|
public ExcelWriterBuilder withTemplate(File templateFile) { |
|
|
|
public ExcelWriterBuilder withTemplate(File templateFile) { |
|
|
|
writeWorkbook.setTemplateFile(templateFile); |
|
|
|
writeWorkbook.setTemplateFile(templateFile); |
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Template file. |
|
|
|
|
|
|
|
* This file is read into memory, excessive cases can lead to OOM. |
|
|
|
|
|
|
|
*/ |
|
|
|
public ExcelWriterBuilder withTemplate(String pathName) { |
|
|
|
public ExcelWriterBuilder withTemplate(String pathName) { |
|
|
|
return withTemplate(new File(pathName)); |
|
|
|
return withTemplate(new File(pathName)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public ExcelWriter build() { |
|
|
|
public ExcelWriter build() { |
|
|
|
return new ExcelWriter(writeWorkbook); |
|
|
|
return new ExcelWriter(writeWorkbook); |
|
|
|
} |
|
|
|
} |
|
|
|