要求:使用easypoi导出Excel的时候,要求增加”序号“列,从1开始增加。这列与业务数据无关,只是展示用,便于定位。如下图所示
实现方式:Java对象新增一列,注意name = "序号", format = "isAddIndex"
/**
* 序号
*/
@Excel(name = "序号", orderNum = "1", format = "isAddIndex")
private Integer index;
要求:使用easypoi导出Excel的时候,要求增加”序号“列,从1开始增加。这列与业务数据无关,只是展示用,便于定位。如下图所示
实现方式:Java对象新增一列,注意name = "序号", format = "isAddIndex"
/**
* 序号
*/
@Excel(name = "序号", orderNum = "1", format = "isAddIndex")
private Integer index;