Browse Source

Merge pull request #3917 from alibaba/bugfix

* 兼容某些特殊的xls: 修改了内置的样式导致判断样式错误
pull/3926/head
Jiaju Zhuang 4 months ago committed by GitHub
parent
commit
802c86fc84
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      easyexcel-core/src/main/java/com/alibaba/excel/constant/BuiltinFormats.java

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

@ -21,6 +21,8 @@ import com.alibaba.excel.util.StringUtils;
**/ **/
public class BuiltinFormats { public class BuiltinFormats {
private static final String RESERVED = "reserved-";
public static short GENERAL = 0; public static short GENERAL = 0;
public static final String[] BUILTIN_FORMATS_ALL_LANGUAGES = { 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 // 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; return defaultFormat;
} }

Loading…
Cancel
Save