Skip to content
Discussion options

You must be logged in to vote

基于我的了解,fesod 暂时不支持多行循环填充。
不过,可以通过“手动拆分数据 + 合并单元格”的方式实现同样的效果:

版本:v1.3.0

查看完整 Demo
  • Model
@Data
public static class ExcelModel {

    @ExcelProperty("项号")
    private Integer no;

    @ExcelProperty("编码")
    private String code;

    @ExcelProperty("名称")
    private String name;

    @ContentLoopMerge(eachRow = 2)
    @ExcelProperty("箱数")
    private Integer totalCount;

    @ContentLoopMerge(eachRow = 2)
    @ExcelProperty("毛重")
    private Integer totalWeight;

    @ExcelProperty("数量")
    private Integer count1;

    @ExcelIgnore
    private Integer count2;

    public List<ExcelModel> splitModels() {
        List<ExcelModel> result = new ArrayList<>();

        ExcelModel one = new E…

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@wujinhuangye-io
Comment options

@wujinhuangye-io
Comment options

@wujinhuangye-io
Comment options

@bengbengbalabalabeng
Comment options

@wujinhuangye-io
Comment options

Answer selected by wujinhuangye-io
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants