diff --git a/src/test/java/com/alibaba/easyexcel/test/WriteTest.java b/src/test/java/com/alibaba/easyexcel/test/WriteTest.java index da15b356..d961546b 100644 --- a/src/test/java/com/alibaba/easyexcel/test/WriteTest.java +++ b/src/test/java/com/alibaba/easyexcel/test/WriteTest.java @@ -31,18 +31,15 @@ public class WriteTest { sheet1.setHead(createTestListStringHead()); //or 设置自适应宽度 //sheet1.setAutoWidth(Boolean.TRUE); - writer.write1(createTestListObject(), sheet1); - - - //写第二个sheet sheet2 模型上打有表头的注解,合并单元格 Sheet sheet2 = new Sheet(2, 3, JavaModel1.class, "第二个sheet", null); sheet2.setTableStyle(createTableStyle()); //writer.write1(null, sheet2); writer.write(createTestListJavaMode(), sheet2); + //需要合并单元格 writer.merge(5,20,1,1);