code: private void exportCSVByMapHandler(List<?> data, Class clazz, boolean isWriteHeader, Appendable appendable)
              throws Excel4JException, IOException {
  
          List<ExcelHeader> headers = Utils.getHeaderList(clazz);
          appendable.append(new String(UTF_8_DOM, StandardCharsets.UTF_8));
  
          try (CSVPrinter printer = new CSVPrinter(appendable, CSVFormat.EXCEL)) {
  
              if (isWriteHeader) {
                  for (ExcelHeader header : headers) {
                      printer.print(header.getTitle());
                  }
                  printer.println();
              }
              // 写数据
              for (Object _data : data) {
                  for (ExcelHeader header : headers) {
                      printer.print(
                              Utils.getProperty(_data, header.getFiled(), header.getWriteConverter())
                      );
                  }
                  printer.println();
              }
              printer.flush();
          }
      }
docs: 生成CSV