使用easyexcel导出多表头excel文件

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_20009015/article/details/86710595

多表头的model

package com.souche.financial.report.model.eo;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.metadata.BaseRowModel;
import lombok.Data;
import org.springframework.util.Assert;

import java.math.BigDecimal;

/**
 * @author weiyu
 * @version V1.0
 * @since 2019-01-28
 */
@Data
public class TaxVerificationOutEO extends BaseRowModel {
    @ExcelProperty(value = {"帐套编码","帐套编码"},index = 0)
    private String organizeId;

    @ExcelProperty(value = {"帐套名称","帐套名称"},index = 1)
    private String organizeName;

    @ExcelProperty(value = {"税款所属期","税款所属期"},index = 2)
    private String verificationDate;

    @ExcelProperty(value={ "上期留抵税额","申报值"},index = 3)
    private BigDecimal basisTax;
    @ExcelProperty(value = {"上期留抵税额","差异"},index = 4)
    private BigDecimal basisTaxDiff;

    @ExcelProperty(value = {"本期销项","申报值"},index = 5)
    private BigDecimal outputTax;
    @ExcelProperty(value = {"本期销项","差异"},index = 6)
    private BigDecimal outputTaxDiff;

    @ExcelProperty(value = {"本期进项","申报值"},index = 7)
    private BigDecimal inputTax;
    @ExcelProperty(value = {"本期进项","差异"},index = 8)
    private BigDecimal inputTaxDiff;


    @ExcelProperty(value = {"进项转出","申报值"},index = 9)
    private BigDecimal inputTransfer;
    @ExcelProperty(value ={"进项转出", "差异"},index = 10)
    private BigDecimal inputTransferDiff;


    @ExcelProperty(value = {"本期留抵税额","申报值"},index = 11)
    private BigDecimal taxResult;
    @ExcelProperty(value = {"本期留抵税额","差异"},index = 12)
    private BigDecimal taxResultDiff;
}

效果
在这里插入图片描述

详情参照:
https://blog.csdn.net/qq_20009015/article/details/86709329
https://blog.csdn.net/qq_20009015/article/details/86710590

猜你喜欢

转载自blog.csdn.net/qq_20009015/article/details/86710595