liaochong / myexcel

MyExcel, a new way to operate excel!

Home Page:https://github.com/liaochong/myexcel/wiki

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

最新的版本以表头读取貌似bug

daihy8759 opened this issue · comments

commented

实体

public class User{
  @ExcelColumn(title = "名称")
  private String name;
}

读取

List<User> list = SaxExcelReader.of(User.class).read(file.getInputStream()).stream();

获取name的内容是空的

这段代码貌似走不到else

if (readConfig.getRowFilter().test(currentRow)) {
    fieldHandler.accept(colNum, content);
} else if (readWithTitle) {
commented

加了rowFilter(row -> row.getRowNum() > 0)解决,记得以前是不用的

标题读取都是需要rowFilter的