fix: 判断负数类型错误

This commit is contained in:
taojinlong 2024-10-09 15:58:45 +08:00
parent 2a32bb2bb6
commit d8b50abf3a

View File

@ -311,7 +311,7 @@ public class ExcelUtils {
if (StringUtils.isEmpty(value) || value.length() > 19) {
return "TEXT";
}
String regex = "^\\d+(\\.\\d+)?$";
String regex = "^-?\\d+(\\.\\d+)?$";
if (!value.matches(regex)) {
return "TEXT";
}