处理excel出现表头有空的情况

This commit is contained in:
maxiaohu 2022-03-09 17:37:11 +08:00
parent 62fc38078c
commit 770e987675

View File

@ -264,6 +264,8 @@ public class ExcelUtil<T>
if (StringUtils.isNotNull(cell)) if (StringUtils.isNotNull(cell))
{ {
String value = this.getCellValue(heard, i).toString(); String value = this.getCellValue(heard, i).toString();
// 处理excel出现表头有空的情况
value = value.trim();
cellMap.put(value, i); cellMap.put(value, i);
} }
else else