mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-04-19 03:01:48 +08:00
fix bug
This commit is contained in:
parent
6bde21ff4a
commit
665ba76f98
@ -46,7 +46,8 @@ public class MapSheetReader extends AbstractSheetReader<List<Map<String, Object>
|
||||
} else if (headerRowIndex > lastRowNum) {
|
||||
throw new IndexOutOfBoundsException(StrUtil.format("Header row index {} is greater than last row index {}.", headerRowIndex, lastRowNum));
|
||||
} else if (startRowIndex > lastRowNum) {
|
||||
throw new IndexOutOfBoundsException(StrUtil.format("startRowIndex row index {} is greater than last row index {}.", startRowIndex, lastRowNum));
|
||||
// issue#I5U1JA 只有标题行的Excel,起始行是1,标题行(最后的行号是0)
|
||||
return ListUtil.empty();
|
||||
}
|
||||
final int startRowIndex = Math.max(this.startRowIndex, firstRowNum);// 读取起始行(包含)
|
||||
final int endRowIndex = Math.min(this.endRowIndex, lastRowNum);// 读取结束行(包含)
|
||||
|
13
hutool-poi/src/test/java/cn/hutool/poi/excel/IssueI5U1JATest.java
Executable file
13
hutool-poi/src/test/java/cn/hutool/poi/excel/IssueI5U1JATest.java
Executable file
@ -0,0 +1,13 @@
|
||||
package cn.hutool.poi.excel;
|
||||
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
public class IssueI5U1JATest {
|
||||
@Test
|
||||
@Ignore
|
||||
public void readAllTest() {
|
||||
final ExcelReader reader = ExcelUtil.getReader("d:/test/issueI5U1JA.xlsx");
|
||||
reader.readAll();
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user