DefaultExcelBuilder support auto merge
@@ -37,7 +37,7 @@ public class DefaultExcelBuilder<T> implements Closeable {
private static final String STYLE_TITLE = "font-weight:bold;font-size:14;text-align:center;vertical-align:middle;";
- private DefaultStreamExcelBuilder<T> streamExcelBuilder;
+ private final DefaultStreamExcelBuilder<T> streamExcelBuilder;
private DefaultExcelBuilder(DefaultStreamExcelBuilder<T> streamExcelBuilder) {
streamExcelBuilder.widthStrategy(WidthStrategy.COMPUTE_AUTO_WIDTH);
@@ -182,6 +182,11 @@ public class DefaultExcelBuilder<T> implements Closeable {
return this;
}
+ public DefaultExcelBuilder<T> autoMerge() {
+ streamExcelBuilder.autoMerge();
+ return this;
+ }
+
public Workbook build(List<T> data) {
try {
streamExcelBuilder.start();
