code: public static <T> void writeWorkBook(File file, int excelType, List<T> beans, int count)
              throws WriteExcelException {
          Workbook workbook = null;
          if (XLSX == excelType) {
              workbook = new XSSFWorkbook();
          } else if (XLS == excelType) {
              workbook = new HSSFWorkbook();
          } else {
              throw new WriteExcelException("excelType参数错误");
          }
  
          if (beans == null || beans.isEmpty()) {
              throw new WriteExcelException("beans参数不能为空");
          }
          Map<String, Object> map = null;
          if (beans.get(0) instanceof Map) {
              map = (Map<String, Object>) beans.get(0);
          } else {
              map = CommonUtils.toMap(beans.get(0));
          }
          if (map == null) {
              throw new WriteExcelException("获取bean属性失败");
          }
          List<String> properties = new ArrayList<String>();
          properties.addAll(map.keySet());
          WriteExcelUtils.writeWorkBook(workbook, count, beans, properties, properties, null);
          OutputStream os = null;
          try {
              os = new FileOutputStream(file);
              WriteExcelUtils.writeWorkBookToExcel(workbook, os);
          } catch (Exception e) {
              throw new WriteExcelException(e.getMessage());
          } finally {
              CommonUtils.closeIOStream(null, os);
          }
      }
docs: 向工作簿中写入beans，所有bean写在一个Sheet中,默认以bean中的所有属性作为标题且写入第0行，0-based。
  日期格式采用默认类型。并输出到指定file中
  
  @param file      指定Excel输出文件
  @param excelType 输出Excel文件类型{@link #XLSX}或者{@link #XLS},此类型必须与file文件名后缀匹配
  @param beans     指定写入的Beans(或者泛型为Map)
  @param count     指定每一个Sheet写入几个Bean
  @throws WriteExcelException