easyexcel icon indicating copy to clipboard operation
easyexcel copied to clipboard

注解ExcelProperty index 属性是否可以被定义为对应列在表头集合中的排序条件,而不是列的编号

Open cuivip opened this issue 1 year ago • 0 comments

建议描述

public class DataModel {
    @ExcelProperty(index = 0)
    private String column1;

    @ExcelProperty(index = 2)
    private String column3;

    // getters and setters
}

上面的bean导出时,会有1个空列,因为index =1 缺失。是否可以将index的值处理为排序条件,只要保证column1 可以排在 column2前面即可,哪怕index分别是 11,34 这样在处理多列导出文件时会更方便

cuivip avatar Nov 07 '24 07:11 cuivip