code: public String export() throws Exception {
      TransferFormat format = Enums.get(TransferFormat.class, Strings.capitalize(get("format", "Xls")))
          .getOrElse(TransferFormat.Xls);
      String fileName = get("fileName");
      String template = get("template");
      if (Strings.isEmpty(fileName)) fileName = "exportResult";
      // 配置导出上下文
      Context context = new Context();
      context.put("format", format);
      context.put("exportFile", fileName);
      context.put("template", template);
      String properties = get("properties");
      if (null != properties) {
        String[] props = Strings.split(properties, ",");
        List<String> keys = CollectUtils.newArrayList();
        List<String> titles = CollectUtils.newArrayList();
        for (String prop : props) {
          if (prop.contains(":")) {
            keys.add(Strings.substringBefore(prop, ":"));
            titles.add(getTextInternal(Strings.substringAfter(prop, ":")));
          } else {
            keys.add(prop);
            titles.add(getTextInternal(getShortName() + "." + prop));
          }
        }
        context.put(Context.KEYS, Strings.join(keys, ","));
        context.put(Context.TITLES, Strings.join(titles, ","));
      } else {
        context.put(Context.KEYS, get("keys"));
        context.put(Context.TITLES, get("titles"));
      }
      context.put(Context.EXTRACTOR, getPropertyExtractor());
  
      HttpServletResponse response = ServletActionContext.getResponse();
      Exporter exporter = buildExporter(format, context);
      configExporter(exporter, context);
      if (format.equals(TransferFormat.Xls)) {
        response.setContentType("application/vnd.ms-excel;charset=GBK");
      } else {
        response.setContentType("application/x-msdownload");
      }
      response.setHeader("Content-Disposition",
          "attachment;filename=" + RequestUtils.encodeAttachName(ServletActionContext.getRequest(),
              fileName + "." + Strings.uncapitalize(format.name())));
      // 进行输出
      exporter.setContext(context);
      exporter.transfer(new TransferResult());
      return null;
    }
docs: 导出数据
  
  @throws Exception