mirror of
https://github.com/dataease/dataease.git
synced 2026-05-15 05:22:13 +08:00
fix: 修复excel类型判断错误
This commit is contained in:
@@ -321,6 +321,10 @@ public class ExcelUtils {
|
||||
if (StringUtils.isEmpty(value) || value.length() > 19) {
|
||||
return "TEXT";
|
||||
}
|
||||
String numberFormatRegex = "^[1-9]\\d*$";
|
||||
if (!value.matches(numberFormatRegex)) {
|
||||
return "TEXT";
|
||||
}
|
||||
String regex = "^-?\\d+(\\.\\d+)?$";
|
||||
if (!value.matches(regex)) {
|
||||
return "TEXT";
|
||||
|
||||
Reference in New Issue
Block a user