ExcelUtil工具类-》自定义隐藏excel字段:修复隐藏所有子类,会把子类所有参数放到一个单元格问题;修复-》隐藏部分字段-》表头隐藏-》但内容依然会向右偏移问题

pull/455/head
tqg 2023-06-10 15:57:11 +08:00
parent 96ddcae762
commit 4f38ba8b68
1 changed files with 3 additions and 4 deletions

View File

@ -728,15 +728,14 @@ public class ExcelUtil<T>
subField.setAccessible(true);
Excel attr = subField.getAnnotation(Excel.class);
this.addCell(attr, row, (T) obj, subField, column + subIndex);
subIndex++;
}
subIndex++;
}
subFirst = true;
}
this.subMergedFirstRowNum = this.subMergedFirstRowNum + subList.size();
}
else
{
} else if (!Collection.class.isAssignableFrom(field.getType())) {
//子类对象可能被隐藏
this.addCell(excel, row, vo, field, column++);
}
}