From 0bdabebe5c20ce495f3035fbbdc8486e79398326 Mon Sep 17 00:00:00 2001 From: Jiaju Zhuang Date: Fri, 17 Sep 2021 22:06:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BB=A3=E7=A0=81=E8=A7=84?= =?UTF-8?q?=E7=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/alibaba/excel/util/PositionUtils.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/alibaba/excel/util/PositionUtils.java b/src/main/java/com/alibaba/excel/util/PositionUtils.java index 329e16e1..48c5cde5 100644 --- a/src/main/java/com/alibaba/excel/util/PositionUtils.java +++ b/src/main/java/com/alibaba/excel/util/PositionUtils.java @@ -14,6 +14,7 @@ public class PositionUtils { private static final Pattern CELL_REF_PATTERN = Pattern.compile("(\\$?[A-Z]+)?" + "(\\$?[0-9]+)?", Pattern.CASE_INSENSITIVE); private static final char SHEET_NAME_DELIMITER = '!'; + private static final char REDUNDANT_CHARACTERS = '$'; private PositionUtils() {} @@ -63,7 +64,7 @@ public class PositionUtils { } String col = matcher.group(1); - if (col.length() > 0 && col.charAt(0) == '$') { + if (col.length() > 0 && col.charAt(0) == REDUNDANT_CHARACTERS) { col = col.substring(1); } if (col.length() == 0) {