Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
cuivip opened this issue Nov 7, 2024 · 0 comments
Labels
suggest Suggest

Comments

@cuivip
Copy link

cuivip commented Nov 7, 2024

建议描述

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 cuivip added the suggest Suggest label Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
suggest Suggest
Projects
None yet
Development

No branches or pull requests

1 participant