7
触发场景描述
触发Bug的代码
List<List<String>> header = new ArrayList<>();
for (int i = 0; i < 10; i++) {
header.add(Collections.singletonList("header" + i));
}
ExcelWriter build = EasyExcel.write("F:/aaa2.xlsx").registerWriteHandler(EasyExcelStyleUtil.getHorizontalCellStyleStrategy())
.build();
WriteSheet sheet = EasyExcel.writerSheet("shell0")
.head(header)
.build();
List<List<Object>> writeList = new ArrayList<>();
List<Object> list = new ArrayList<>();
for (int i = 0; i < 10; i++) {
if (i == 0) {
list.add(0.00d);
} else if (i == 1) {
list.add(0.00f);
} else if (i == 2) {
list.add(0);
} else if(i == 3){
list.add("0.00");
} else {
list.add("0");
}
}
writeList.add(list);
build.write(writeList, sheet);
build.finish();
提示的异常或者没有达到的效果