code: def gen_xlsx_table():
      '''
      excel中的数据作为表中的字段，创建表
      '''
  
  
      XLSX_FILE = './database/esheet/20180811.xlsx'
      if os.path.exists(XLSX_FILE):
          pass
      else:
          return
  
      fields = []
      for sheet_ranges in load_workbook(filename=XLSX_FILE):
  
          for xr in FILTER_COLUMNS:
              row1_val = sheet_ranges[xr + "1"].value
              row2_val = sheet_ranges[xr + "2"].value
              row3_val = sheet_ranges[xr + "3"].value
              row4_val = sheet_ranges[xr + "4"].value
              if row1_val and row1_val.strip() != '':
                  desc = {
                      'slug': row1_val,
                      'name': row2_val,
                      'type': row3_val,
                      'display_mode': row4_val
                  }
  
                  fields.append(desc)
  
      create_tab(fieldsf gen_xlsx_table():
      '''
      excel中的数据作为表中的字段，创建表
      '''
  
  
      XLSX_FILE = './database/esheet/20180811.xlsx'
      if os.path.exists(XLSX_FILE):
          pass
      else:
          return
  
      fields = []
      for sheet_ranges in load_workbook(filename=XLSX_FILE):
  
          for xr in FILTER_COLUMNS:
              row1_val = sheet_ranges[xr + "1"].value
              row2_val = sheet_ranges[xr + "2"].value
              row3_val = sheet_ranges[xr + "3"].value
              row4_val = sheet_ranges[xr + "4"].value
              if row1_val and row1_val.strip() != '':
                  desc = {
                      'slug': row1_val,
                      'name': row2_val,
                      'type': row3_val,
                      'display_mode': row4_val
                  }
  
                  fields.append(desc)
  
      create_tab(fields)
docs: excel中的数据作为表中的字段，创建表