修复导入数据为负浮点数时,导入结果会丢失精度问题

This commit is contained in:
X.B-H 2021-01-07 19:05:19 +08:00
parent e1c2a28752
commit e87e47978e
1 changed files with 2 additions and 2 deletions

View File

@ -1059,7 +1059,7 @@ public class ExcelUtil<T>
} }
else else
{ {
if ((Double) val % 1 > 0) if ((Double) val % 1 != 0)
{ {
val = new BigDecimal(val.toString()); val = new BigDecimal(val.toString());
} }
@ -1090,4 +1090,4 @@ public class ExcelUtil<T>
} }
return val; return val;
} }
} }