This commit is contained in:
Looly 2020-07-07 16:39:10 +08:00
parent 8f50f86fc2
commit 537dfc80b7
4 changed files with 8 additions and 6 deletions

View File

@ -21,6 +21,7 @@
* 【core 】 修复ZipUtil没有调用finish问题issue#944@Github * 【core 】 修复ZipUtil没有调用finish问题issue#944@Github
* 【extra 】 修复Ftp中ArrayList长度为负问题pr#136@Github * 【extra 】 修复Ftp中ArrayList长度为负问题pr#136@Github
* 【core 】 修复Dict中putAll大小写问题issue#I1MU5B@Gitee * 【core 】 修复Dict中putAll大小写问题issue#I1MU5B@Gitee
* 【core 】 修复POI中sax读取数字判断错误问题issue#931@Github
------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------
## 5.3.8 (2020-06-16) ## 5.3.8 (2020-06-16)

View File

@ -73,7 +73,11 @@ public class ExcelSaxUtil {
} }
break; break;
case NUMBER: case NUMBER:
try{
result = getNumberValue(value, numFmtString); result = getNumberValue(value, numFmtString);
}catch (NumberFormatException e){
result = value;
}
break; break;
case DATE: case DATE:
try { try {

View File

@ -213,5 +213,4 @@ public class ExcelReadTest {
final ExcelReader reader = ExcelUtil.getReader("merge_test.xlsx"); final ExcelReader reader = ExcelUtil.getReader("merge_test.xlsx");
reader.read((cell, value)-> Console.log("{}, {} {}", cell.getRowIndex(), cell.getColumnIndex(), value)); reader.read((cell, value)-> Console.log("{}, {} {}", cell.getRowIndex(), cell.getColumnIndex(), value));
} }
} }

View File

@ -115,10 +115,8 @@ public class ExcelSaxReadTest {
public void readBlankTest(){ public void readBlankTest(){
File file = new File("D:/test/b.xlsx"); File file = new File("D:/test/b.xlsx");
ExcelUtil.readBySax(file, 0, (sheetIndex, rowIndex, rowList) -> { ExcelUtil.readBySax(file, 0, (sheetIndex, rowIndex, rowList) -> rowList.forEach(Console::log));
rowList.forEach(System.out::println);
});
ExcelUtil.getReader(file).read().forEach(System.out::println); ExcelUtil.getReader(file).read().forEach(Console::log);
} }
} }