8
异常代码
ExcelListener excelListener = new ExcelListener();
excelReader = EasyExcel.read(in,null,excelListener).build();
excelReader.read();
AnalysisEventListener的invoke方法如下:
ReadSheetHolder readSheetHolder = analysisContext.readSheetHolder();
String sheetName = readSheetHolder.getSheetName();
if(Objects.isNull(o) || ((HashMap) o).size() == 0){
return;
}
if(map.containsKey(sheetName)){
map.get(sheetName).add(o);
}else {
List<Object> objectList = new ArrayList<>();
objectList.add(o);
map.put(sheetName,objectList);
}
异常提示 无异常,解析的数据,对象o无表头中文数据 建议描述