From e2f302f4cf1d338fe6ff6150795f1d99cb01088d Mon Sep 17 00:00:00 2001 From: Jiaju Zhuang Date: Tue, 6 Aug 2024 17:43:36 +0800 Subject: [PATCH] =?UTF-8?q?*=20=E5=85=BC=E5=AE=B9=E6=9F=90=E4=BA=9B?= =?UTF-8?q?=E7=89=B9=E6=AE=8A=E7=9A=84xls:=20=E4=BF=AE=E6=94=B9=E4=BA=86?= =?UTF-8?q?=E5=86=85=E7=BD=AE=E7=9A=84=E6=A0=B7=E5=BC=8F=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E5=88=A4=E6=96=AD=E6=A0=B7=E5=BC=8F=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/alibaba/excel/constant/BuiltinFormats.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/easyexcel-core/src/main/java/com/alibaba/excel/constant/BuiltinFormats.java b/easyexcel-core/src/main/java/com/alibaba/excel/constant/BuiltinFormats.java index 7e071af5..b6fb8e48 100644 --- a/easyexcel-core/src/main/java/com/alibaba/excel/constant/BuiltinFormats.java +++ b/easyexcel-core/src/main/java/com/alibaba/excel/constant/BuiltinFormats.java @@ -21,6 +21,8 @@ import com.alibaba.excel.util.StringUtils; **/ public class BuiltinFormats { + private static final String RESERVED = "reserved-"; + public static short GENERAL = 0; public static final String[] BUILTIN_FORMATS_ALL_LANGUAGES = { @@ -491,7 +493,7 @@ public class BuiltinFormats { } // In other cases, give priority to using the externally provided format - if (!StringUtils.isEmpty(defaultFormat) && !defaultFormat.startsWith("reserved-")) { + if (!StringUtils.isEmpty(defaultFormat) && !defaultFormat.startsWith(RESERVED)) { return defaultFormat; }