目前只支持Bean列表方式导出csv文件。

    1. Csv csv = CsvBuilder.of(People.class).build(getDataList());
    2. AttachmentExportUtil.export(csv.getFilePath(), "test.csv", response);

    Bean定义

    1. public class People {
    2.  
    3. @ExcelColumn(order = 0, title = "姓名")
    4. private String name;
    5.  
    6. @ExcelColumn(order = 1, title = "年龄")
    7. private Integer age;
    8.  
    9. @ExcelColumn(order = 2, title = "性别")
    10. private String gender;
    11. }

    与excel导出注解相比,支持属性减少,width、style属性将不被支持,注解请移步:注解