fix mergeRegion

This commit is contained in:
Looly 2020-10-15 18:49:34 +08:00
parent fb46196782
commit cb761ffea2
3 changed files with 7 additions and 3 deletions

View File

@ -26,6 +26,7 @@
* 【core 】 解决ListUtil计算总量可能的int溢出问题pr#1150@Github
* 【json 】 解决JSON中转换为double小数精度丢失问题pr#192@Gitee
* 【core 】 修复CaseInsensitiveMap的remove等方法并没有忽略大小写的问题pr#1163@Gitee
* 【poi 】 修复合并单元格值读取错误的问题
-------------------------------------------------------------------------------------------------------------

View File

@ -103,7 +103,7 @@ public class CellUtil {
cellType = cell.getCellTypeEnum();
}
if(CellType.BLANK == cellType){
if(CellType.BLANK == cellType || CellUtil.isMergedRegion(cell)){
// 空白单元格可能为合并单元格
cell = getMergedRegionCell(cell);
cellType = cell.getCellTypeEnum();

View File

@ -215,9 +215,12 @@ public class ExcelReadTest {
}
@Test
@Ignore
public void readTest() {
final ExcelReader reader = ExcelUtil.getReader("d:/test/人员体检信息表.xlsx");
final List<List<Object>> read = reader.read();
// Console.log(read);
final List<List<Object>> read = reader.read(2);
for (List<Object> list : read) {
Console.log(list);
}
}
}