Closed itflash closed 3 weeks ago
JDK版本: 1.8.0_301 hutool版本: 5.8.32
合并单元格,写入内容为空
List<String> row1 = CollUtil.newArrayList("aa", "bb", "cc", "dd"); List<String> row2 = CollUtil.newArrayList("aa1", "bb1", "cc1", "dd1"); List<String> row3 = CollUtil.newArrayList("aa2", "bb2", "cc2", "dd2"); List<String> row4 = CollUtil.newArrayList("aa3", "bb3", "cc3", "dd3"); List<String> row5 = CollUtil.newArrayList("aa4", "bb4", "cc4", "dd4"); List<List<String>> rows = CollUtil.newArrayList(row1, row2, row3, row4, row5); //通过工具类创建writer ExcelWriter writer = ExcelUtil.getWriter("G:\\project\\writeTest.xlsx"); //跳过当前行,既第一行,非必须,在此演示用 // writer.passCurrentRow(); //合并单元格后的标题行,使用默认标题样式 writer.merge(row1.size() , "测试标题"); writer.merge(1, 5, 4, 4, "11111", false); //一次性写出内容,强制输出标题 writer.write(rows, true); //关闭writer,释放内存 writer.close();
比如报错的Excel文件,有问题的图片等。
@itflash 看下这个:
https://github.com/dromara/hutool/issues/1696
版本情况
JDK版本: 1.8.0_301 hutool版本: 5.8.32
问题描述(包括截图)
合并单元格,写入内容为空
比如报错的Excel文件,有问题的图片等。