关于excel复杂表头导入mysql之一
这种类型的,可以直接把两层单元格的拆分即可
/**
* 早班值班干部
*/
// @Excel(name = "早班值班干部",needMerge = true)
@ExcelProperty(index = 6)
@ApiModelProperty(value = "早班值班干部")
private String morningDutyOfficer;
/**
* 中班值班干部
*/
// @Excel(name = "中班值班干部",needMerge = true)
@ExcelProperty(index = 7)
@ApiModelProperty(value = "中班值班干部")
private String noonDutyOfficer;
/**
* 晚班值班干部
*/
// @Excel(name = "晚班值班干部")
@ExcelProperty(index = 8)
@ApiModelProperty(value = "晚班值班干部")
private String eveningDutyOfficer;
像我这样,因为有没有名字的标头,所以一定要加index
还有就是使用easyexcel较为简单,poi本人没有搞出来,所以推荐大家使用简单的这个