Skip to content

Commit 802c86f

Browse files
authored
Merge pull request #3917 from alibaba/bugfix
* 兼容某些特殊的xls: 修改了内置的样式导致判断样式错误
2 parents 3a1db02 + e2f302f commit 802c86f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

easyexcel-core/src/main/java/com/alibaba/excel/constant/BuiltinFormats.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
**/
2222
public class BuiltinFormats {
2323

24+
private static final String RESERVED = "reserved-";
25+
2426
public static short GENERAL = 0;
2527

2628
public static final String[] BUILTIN_FORMATS_ALL_LANGUAGES = {
@@ -491,7 +493,7 @@ public static String getBuiltinFormat(Short index, String defaultFormat, Locale
491493
}
492494

493495
// In other cases, give priority to using the externally provided format
494-
if (!StringUtils.isEmpty(defaultFormat) && !defaultFormat.startsWith("reserved-")) {
496+
if (!StringUtils.isEmpty(defaultFormat) && !defaultFormat.startsWith(RESERVED)) {
495497
return defaultFormat;
496498
}
497499

0 commit comments

Comments
 (0)