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 384f7518e..d6a93a5ad 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 void processRecord(Record record) { 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 void processRecord(Record record) { 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 a309027a0..579a821fc 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 void t01Read07() { } @Test - public void t020Read03() { + public void t02Read03() { read(file03); }