EasyExcel 导入数据出错The index of ‘xx’ and ‘xx’ must be inconsistent

原因:两个字段的index索引值都是0,导致异常

错误代码:

@ExcelProperty(index = 0)
private String  oneSubjectName;

@ExcelProperty(index = 0)
private String  twoSubjectName;

修改后:

@ExcelProperty(index = 0)
private String  oneSubjectName;

@ExcelProperty(index = 1)
private String  twoSubjectName;

0 Replies to “EasyExcel 导入数据出错The index of ‘xx’ and ‘xx’ must be inconsistent”

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注