|
@@ -1,6 +1,7 @@
|
|
|
package cn.tr.module.excel.core.handler.read;
|
|
package cn.tr.module.excel.core.handler.read;
|
|
|
|
|
|
|
|
import cn.hutool.core.collection.CollectionUtil;
|
|
import cn.hutool.core.collection.CollectionUtil;
|
|
|
|
|
+import cn.hutool.core.util.StrUtil;
|
|
|
import cn.tr.module.excel.core.constant.ExcelConstant;
|
|
import cn.tr.module.excel.core.constant.ExcelConstant;
|
|
|
import cn.tr.module.excel.core.dto.ExcelRowDataDTO;
|
|
import cn.tr.module.excel.core.dto.ExcelRowDataDTO;
|
|
|
import cn.tr.module.excel.core.dto.ExcelSheetCallBackDTO;
|
|
import cn.tr.module.excel.core.dto.ExcelSheetCallBackDTO;
|
|
@@ -42,7 +43,7 @@ public class CustomerReadListener<T> implements ReadListener<T> {
|
|
|
//对sheet的表头进行校验
|
|
//对sheet的表头进行校验
|
|
|
headMap.forEach((k,value)->{
|
|
headMap.forEach((k,value)->{
|
|
|
String cellValue = value.getStringValue();
|
|
String cellValue = value.getStringValue();
|
|
|
- value.setStringValue(cellValue.replace("*","").trim());
|
|
|
|
|
|
|
+ value.setStringValue(StrUtil.trim(StrUtil.replace(cellValue,"*","")));
|
|
|
});
|
|
});
|
|
|
validateExcelHead(fieldMap,headMap);
|
|
validateExcelHead(fieldMap,headMap);
|
|
|
headIndex = context.readRowHolder().getRowIndex();
|
|
headIndex = context.readRowHolder().getRowIndex();
|