code: public static <T> void writeWorkBook(File file, int excelType, List<T> beans, List<String> properties,
                                           List<String> titles, String dateFormat) throws WriteExcelException {
          Workbook workbook = null;
          if (XLSX == excelType) {
              workbook = new XSSFWorkbook();
          } else if (XLS == excelType) {
              workbook = new HSSFWorkbook();
          } else {
              throw new WriteExcelException("excelType参数错误");
          }
          WriteExcelUtils.writeWorkBook(workbook, beans.size(), beans, properties, titles, dateFormat);
          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中,标题写在第0行,0-based。并输出到指定file中
  
  @param file       指定Excel输出文件
  @param excelType  输出Excel文件类型{@link #XLSX}或者{@link #XLS},此类型必须与file文件名后缀匹配
  @param beans      指定写入的Beans(或者泛型为Map)
  @param properties 指定写入的bean的属性
  @param titles     指定写入的标题
  @param dateFormat 日期格式
  @throws WriteExcelException