Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- units_and_local_workbook = load_workbook(filename='teams.xlsx')
- for sheets in units_and_local_workbook:
- unit_sheet = units_and_local_workbook.get_sheet_by_name(sheets.title)
- for value in unit_sheet.iter_rows(min_row=3, min_col=1, max_col=1, values_only=True):
- string_out = str(value)
- unit_number = re.findall(r'\d+', string_out)
- if unit_sheet.title == 'Eastern Unit':
- eastern_unit.append(int(unit_number[0]))
- if unit_sheet.title == 'Eastern Local Team':
- eastern_local_teams.append(int(unit_number[0]))
- if unit_sheet.title == 'Mid West Unit':
- mid_west_unit.append(int(unit_number[0]))
- if unit_sheet.title == 'Mid West Local Team':
- mid_west_local_teams.append(int(unit_number[0]))
- if unit_sheet.title == 'North East Unit':
- north_east_unit.append(int(unit_number[0]))
- if unit_sheet.title == 'North East Local Team':
- north_east_local_teams.append(int(unit_number[0]))
- if unit_sheet.title == 'North West Unit':
- north_west_unit.append(int(unit_number[0]))
- if unit_sheet.title == 'North West Local Team':
- north_west_local_teams.append(int(unit_number[0]))
- if unit_sheet.title == 'South East Unit':
- south_east_unit.append(int(unit_number[0]))
- if unit_sheet.title == 'South East Local Team':
- south_east_local_unit.append(int(unit_number[0]))
- if unit_sheet.title == 'South West Unit':
- south_west_unit.append(int(unit_number[0]))
- if unit_sheet.title == 'South West Local Team':
- south_west_local_teams.append(int(unit_number[0]))
- if unit_sheet.title == 'West Central Mid Unit':
- west_central_midlands_unit.append(int(unit_number[0]))
- if unit_sheet.title == 'West Central Mid Local Team':
- west_central_midlands_local_teams.append(int(unit_number[0]))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement