目前只支持Bean列表方式导出csv文件。
- Csv csv = CsvBuilder.of(People.class).build(getDataList());
- AttachmentExportUtil.export(csv.getFilePath(), "test.csv", response);
Bean定义
- public class People {
- @ExcelColumn(order = 0, title = "姓名")
- private String name;
- @ExcelColumn(order = 1, title = "年龄")
- private Integer age;
- @ExcelColumn(order = 2, title = "性别")
- private String gender;
- }
与excel导出注解相比,支持属性减少,width、style属性将不被支持,注解请移步:注解