@ExcelProperty(value = "职务", index = 0)
value 与index 的优先级, 实测得出下面结论.
1、只有value : 按照value 的匹配
2、只有index: 按照index 的匹配
3、 同时有value和index: 按照index的匹配.
结果: 按照index的匹配, 找到的数据
{"administrativeDuty": "村长5","name": "李兰花","mobile": "14417171001"
},
{"administrativeDuty": "村长6","name": "李兰花","mobile": "14417171002"
},
{"administrativeDuty": "村长7","name": "李兰花","mobile": "14417171001"
},
{"administrativeDuty": "村长8","name": "李兰花","mobile": "14417171002"
},
{"administrativeDuty": "村长9","name": "李兰花","mobile": "14417171001"
}
依赖版本:
<dependency><groupId>com.alibaba</groupId><artifactId>easyexcel</artifactId><version>3.2.1</version></dependency>