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 384f7518..d6a93a5a 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 @@ -49,7 +49,6 @@ public class BofRecordHandler extends AbstractXlsRecordHandler { ReadSheet readSheet = new ReadSheet(sheetIndex, orderedBsrs[sheetIndex].getSheetname()); sheets.add(readSheet); } - sheetIndex++; if (context.readSheetHolder() != null) { if (sheetIndex == context.readSheetHolder().getSheetNo()) { context.readWorkbookHolder().setIgnoreRecord03(Boolean.FALSE); @@ -57,6 +56,7 @@ public class BofRecordHandler extends AbstractXlsRecordHandler { context.readWorkbookHolder().setIgnoreRecord03(Boolean.TRUE); } } + sheetIndex++; } } } diff --git a/src/test/java/com/alibaba/easyexcel/test/core/multiplesheets/MultipleSheetsDataTest.java b/src/test/java/com/alibaba/easyexcel/test/core/multiplesheets/MultipleSheetsDataTest.java index a309027a..579a821f 100644 --- a/src/test/java/com/alibaba/easyexcel/test/core/multiplesheets/MultipleSheetsDataTest.java +++ b/src/test/java/com/alibaba/easyexcel/test/core/multiplesheets/MultipleSheetsDataTest.java @@ -36,7 +36,7 @@ public class MultipleSheetsDataTest { } @Test - public void t020Read03() { + public void t02Read03() { read(file03); }