[alibaba/easyexcel]多sheet导入时,当head多余一行时,会将head行读入数据

2024-05-11 960 views
3

触发Bug的代码


  // Initialization property
        this.excelReadHeadProperty = new ExcelReadHeadProperty(this, getClazz(), getHead(), convertAllFiled);
        if (readBasicParameter.getHeadRowNumber() == null) {
            if (parentAbstractReadHolder == null) {  //多sheet时,无法确定getClazz(),headRowNumber 设置为1
                if (excelReadHeadProperty.hasHead()) {
                    this.headRowNumber = excelReadHeadProperty.getHeadRowNumber();
                } else {
                    this.headRowNumber = 1; 
                }
            } else {
                this.headRowNumber = parentAbstractReadHolder.getHeadRowNumber();
            }
        } else {
            this.headRowNumber = readBasicParameter.getHeadRowNumber();
        }
   这里写代码

提示的异常或者没有达到的效果

回答

3
8

image

4

请问一下能提供简易的复现bug代码吗? @huogithub