diff --git a/core/core-backend/src/main/java/io/dataease/datasource/provider/ExcelUtils.java b/core/core-backend/src/main/java/io/dataease/datasource/provider/ExcelUtils.java index 7f19164eb6..86a8482383 100644 --- a/core/core-backend/src/main/java/io/dataease/datasource/provider/ExcelUtils.java +++ b/core/core-backend/src/main/java/io/dataease/datasource/provider/ExcelUtils.java @@ -297,25 +297,19 @@ public class ExcelUtils { } private String cellType(String value) { + if(value.length()> 19){ + return "TEXT"; + } try { - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); - sdf.parse(value); - return "DATETIME"; - } catch (Exception e1) { - if(value.length()> 19){ - return "TEXT"; - } - try { - Double d = Double.valueOf(value); - double eps = 1e-10; - if (d - Math.floor(d) < eps) { - return "LONG"; - } else { - return "DOUBLE"; - } - } catch (Exception e2) { - return "TEXT"; + Double d = Double.valueOf(value); + double eps = 1e-10; + if (d - Math.floor(d) < eps) { + return "LONG"; + } else { + return "DOUBLE"; } + } catch (Exception e2) { + return "TEXT"; } }