From 501742b69ed125c23524e6591612e343362c85b1 Mon Sep 17 00:00:00 2001 From: Echen Date: Tue, 28 Sep 2021 14:09:29 +0800 Subject: [PATCH] =?UTF-8?q?JSY-9752=20fix=20:=2003=E7=89=88=E6=9C=ACexcel?= =?UTF-8?q?=E5=9C=A8=E8=B7=B3=E8=BF=87=E7=9A=84=E6=97=B6=E5=80=99=E9=9C=80?= =?UTF-8?q?=E8=A6=81=E8=AF=BB=E5=8F=96eof=E5=92=8Cbof?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 12 +++++++----- .../analysis/v03/handlers/BofRecordHandler.java | 5 +++++ .../v03/handlers/BoundSheetRecordHandler.java | 5 +++++ .../analysis/v03/handlers/EofRecordHandler.java | 5 +++++ .../analysis/v03/handlers/SstRecordHandler.java | 6 ++++++ 5 files changed, 28 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index 9f1a4c7..3800d3a 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.alibaba easyexcel - 2.2.10 + 2.2.11-QFX-SNAPSHOT jar easyexcel @@ -127,12 +127,14 @@ - ossrh - https://oss.sonatype.org/content/repositories/snapshots + nexus + maven-snapshot + http://mvn.finedevelop.com/repository/fanruan/ - ossrh - https://oss.sonatype.org/service/local/staging/deploy/maven2/ + nexus + maven-releases + http://mvn.finedevelop.com/repository/fanruan-release/ diff --git a/src/main/java/com/alibaba/excel/analysis/v03/handlers/BofRecordHandler.java b/src/main/java/com/alibaba/excel/analysis/v03/handlers/BofRecordHandler.java index 3e6713c..141c60c 100644 --- a/src/main/java/com/alibaba/excel/analysis/v03/handlers/BofRecordHandler.java +++ b/src/main/java/com/alibaba/excel/analysis/v03/handlers/BofRecordHandler.java @@ -20,6 +20,11 @@ import com.alibaba.excel.util.SheetUtils; */ public class BofRecordHandler extends AbstractXlsRecordHandler { + @Override + public boolean support(XlsReadContext xlsReadContext, Record record) { + return true; + } + @Override public void processRecord(XlsReadContext xlsReadContext, Record record) { BOFRecord br = (BOFRecord) record; diff --git a/src/main/java/com/alibaba/excel/analysis/v03/handlers/BoundSheetRecordHandler.java b/src/main/java/com/alibaba/excel/analysis/v03/handlers/BoundSheetRecordHandler.java index 685dcc6..6f491ec 100644 --- a/src/main/java/com/alibaba/excel/analysis/v03/handlers/BoundSheetRecordHandler.java +++ b/src/main/java/com/alibaba/excel/analysis/v03/handlers/BoundSheetRecordHandler.java @@ -13,6 +13,11 @@ import com.alibaba.excel.context.xls.XlsReadContext; */ public class BoundSheetRecordHandler extends AbstractXlsRecordHandler implements IgnorableXlsRecordHandler { + @Override + public boolean support(XlsReadContext xlsReadContext, Record record) { + return true; + } + @Override public void processRecord(XlsReadContext xlsReadContext, Record record) { BoundSheetRecord bsr = (BoundSheetRecord)record; diff --git a/src/main/java/com/alibaba/excel/analysis/v03/handlers/EofRecordHandler.java b/src/main/java/com/alibaba/excel/analysis/v03/handlers/EofRecordHandler.java index 32b5b88..33059fa 100644 --- a/src/main/java/com/alibaba/excel/analysis/v03/handlers/EofRecordHandler.java +++ b/src/main/java/com/alibaba/excel/analysis/v03/handlers/EofRecordHandler.java @@ -19,6 +19,11 @@ import com.alibaba.excel.read.metadata.holder.xls.XlsReadSheetHolder; */ public class EofRecordHandler extends AbstractXlsRecordHandler implements IgnorableXlsRecordHandler { + @Override + public boolean support(XlsReadContext xlsReadContext, Record record) { + return true; + } + @Override public void processRecord(XlsReadContext xlsReadContext, Record record) { if (xlsReadContext.readSheetHolder() == null) { diff --git a/src/main/java/com/alibaba/excel/analysis/v03/handlers/SstRecordHandler.java b/src/main/java/com/alibaba/excel/analysis/v03/handlers/SstRecordHandler.java index 35727b6..c60f870 100644 --- a/src/main/java/com/alibaba/excel/analysis/v03/handlers/SstRecordHandler.java +++ b/src/main/java/com/alibaba/excel/analysis/v03/handlers/SstRecordHandler.java @@ -13,6 +13,12 @@ import com.alibaba.excel.context.xls.XlsReadContext; * @author Dan Zheng */ public class SstRecordHandler extends AbstractXlsRecordHandler implements IgnorableXlsRecordHandler { + + @Override + public boolean support(XlsReadContext xlsReadContext, Record record) { + return true; + } + @Override public void processRecord(XlsReadContext xlsReadContext, Record record) { xlsReadContext.readWorkbookHolder().setReadCache(new XlsCache((SSTRecord)record));