yhy949 opened a new issue, #937: URL: https://github.com/apache/fesod/issues/937
### Search before asking - [x] I searched in the [issues](https://github.com/apache/fesod/issues) and found nothing similar. ### Fesod version 2.1.0-SNAPSHOT ### JDK version 25 ### Operating system win11 ### Steps To Reproduce ```java try (ExcelReader reader = FesodSheet.read(Files.newInputStream(filePath), preDataListener) .readCache(new MapCache()) .password(password).headRowNumber(0).excelType(excelTypeEnum) .autoTrim(true).charset(charset).registerConverter(new Str2NullConverter()) .registerConverter(new DateNumberConverter()).build()) { ReadWorkbookHolder readWorkbookHolder = reader.analysisContext().readWorkbookHolder(); // 判断只有 csv 才需要修改配置信息 if (readWorkbookHolder instanceof CsvReadWorkbookHolder csvReadWorkbookHolder) { // 底层读取 csv 用的是 apache 的 common-csv,所以设置 CsvFormat 即可 csvReadWorkbookHolder.setCsvFormat(CSVFormat.DEFAULT.builder().setDelimiter(delimiter).get()); } // 为每个 sheet 创建 ReadSheet 并设置 limit(2000) List<ReadSheet> readSheets = reader.excelExecutor().sheetList().stream() .peek(sheet ->sheet.setNumRows(2000)).toList(); // 开始解析所有工作表 //reader.readAll(); for (ReadSheet readSheet : readSheets) { reader.read(readSheet); } } catch (Exception e) {} ``` ### Current Behavior 1、使用reader.readAll(); 不会触发第二个sheet读取 2、使用遍历sheet方式读取,不会执行readListener。疑似在第98行处,获取到的还是上一个sheet的。计算getRowIndex还是 上一个sheet index+1 <img width="827" height="623" alt="Image" src="https://github.com/user-attachments/assets/44a44975-a4df-4dbc-b799-f32110c50d01" /> ### Expected Behavior 多个sheet正常限制读取数量 ### Anything else? _No response_ ### Are you willing to submit a PR? - [ ] I'm willing to submit a PR! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
