Browse Source

* 增加部分`xls`容错 [Issue #2236](https://github.com/alibaba/easyexcel/issues/2236)

pull/2472/head
Jiaju Zhuang 3 years ago
parent
commit
49b64dd3df
  1. 5
      easyexcel-core/src/main/java/com/alibaba/excel/analysis/v03/handlers/DummyRecordHandler.java
  2. 1
      update.md

5
easyexcel-core/src/main/java/com/alibaba/excel/analysis/v03/handlers/DummyRecordHandler.java

@ -34,7 +34,10 @@ public class DummyRecordHandler extends AbstractXlsRecordHandler implements Igno
xlsReadSheetHolder.setTempRowType(RowTypeEnum.EMPTY);
} else if (record instanceof MissingCellDummyRecord) {
MissingCellDummyRecord mcdr = (MissingCellDummyRecord)record;
xlsReadSheetHolder.getCellMap().put(mcdr.getColumn(),
// https://github.com/alibaba/easyexcel/issues/2236
// Some abnormal XLS, in the case of data already exist, or there will be a "MissingCellDummyRecord"
// records, so if the existing data, empty data is ignored
xlsReadSheetHolder.getCellMap().putIfAbsent(mcdr.getColumn(),
ReadCellData.newEmptyInstance(mcdr.getRow(), mcdr.getColumn()));
}
}

1
update.md

@ -8,6 +8,7 @@
* 修复03版本无法读取到公式格式的bug [Issue #2444](https://github.com/alibaba/easyexcel/issues/2444)
* 提高类型转换兼容性 [Issue #2443](https://github.com/alibaba/easyexcel/issues/2443)
* 捕获`setFeature`异常不影响主流程 [Issue #2054](https://github.com/alibaba/easyexcel/issues/2054)
* 增加部分`xls`容错 [Issue #2236](https://github.com/alibaba/easyexcel/issues/2236)
# 3.0.5

Loading…
Cancel
Save