|
|
@ -6,7 +6,6 @@ import java.io.OutputStream; |
|
|
|
|
|
|
|
|
|
|
|
import com.alibaba.excel.ExcelWriter; |
|
|
|
import com.alibaba.excel.ExcelWriter; |
|
|
|
import com.alibaba.excel.support.ExcelTypeEnum; |
|
|
|
import com.alibaba.excel.support.ExcelTypeEnum; |
|
|
|
import com.alibaba.excel.write.handler.WriteHandler; |
|
|
|
|
|
|
|
import com.alibaba.excel.write.metadata.WriteWorkbook; |
|
|
|
import com.alibaba.excel.write.metadata.WriteWorkbook; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -18,7 +17,7 @@ public class ExcelWriterBuilder extends AbstractExcelWriterParameterBuilder<Exce |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Workbook |
|
|
|
* Workbook |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private WriteWorkbook writeWorkbook; |
|
|
|
private final WriteWorkbook writeWorkbook; |
|
|
|
|
|
|
|
|
|
|
|
public ExcelWriterBuilder() { |
|
|
|
public ExcelWriterBuilder() { |
|
|
|
this.writeWorkbook = new WriteWorkbook(); |
|
|
|
this.writeWorkbook = new WriteWorkbook(); |
|
|
@ -115,16 +114,6 @@ public class ExcelWriterBuilder extends AbstractExcelWriterParameterBuilder<Exce |
|
|
|
return withTemplate(new File(pathName)); |
|
|
|
return withTemplate(new File(pathName)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Write handler |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @deprecated please use {@link WriteHandler} |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
@Deprecated |
|
|
|
|
|
|
|
public ExcelWriterBuilder registerWriteHandler(com.alibaba.excel.event.WriteHandler writeHandler) { |
|
|
|
|
|
|
|
writeWorkbook.setWriteHandler(writeHandler); |
|
|
|
|
|
|
|
return this; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public ExcelWriter build() { |
|
|
|
public ExcelWriter build() { |
|
|
|
return new ExcelWriter(writeWorkbook); |
|
|
|
return new ExcelWriter(writeWorkbook); |
|
|
|