Import fixtures from file

Fixtures can be imported in to the league from a file uploaded to the website.

The file must contain all fixtures for all leagues in the division. After validating the file content and, if there are no errors, before importing the fixtures to the database, any existing features in the database for this league are removed.

There are some rules about how this file is structured (see below) and certain steps must have been completed, such as the league and it’s divisions must have been created – see League Manager – Starting a new season for an overview of steps.

Importing fixtures

First, you need to select the league – see League Manager – Managing a league.

League Manager – Importing Fixtures From File page (e107)
  1. Select Import fixtures from file
  2. Select the CSV file – more information about the format of this file below
  3. Click Save
  4. If errors are reported, fix in the CSV file and repeat from step 2

The CSV file

Fixtures are imported using a Comma Separated Values file, usually referred to as a CSV file.

These files are usually a Save as…. option provided by most spreadsheets. The data is saved as one line of text per spreadsheet row with each column value separated by a comma.

If there are commas in the values, other characters can be used used, but for fixtures importing we don’t expect commas in the data.

Rules

A few general rules:

  • one file per league (must include all fixtures for all divisions)
  • the file name to be imported must have a .txt suffix,
    e.g. men-2020-21.txt
  • one line in the file per fixture
  • no “extra” spaces, e.g. after a comma
  • no none fixtures lines unless they are completely blank or start with hash (#) or semi-colon (;)
  • e.g. # Start of Division 2
  • dates must be formatted as dd/mm/yyyy
    e.g. 26/09/2020
  • Club names must exactly match clubs already in the database e.g. Sheffield University Banker 3, not SUBHC 3

There are a few rules about what these files should contain – a summary is shown on the Import fixtures form file page.

Column order

Columns must be present in the following order:

  • date
  • original date
  • time
  • division
  • venue
  • home team
  • home score
  • away score
  • away team
  • postponed reason

For example:

27/09/2008,26/09/2008,15:00,0,5,Slazengers 1,2,1,Leeds University 1,postponed reason

Where data is not know – e.g. time, scores are not usually know when importing fixtures at the start of the season

Columns

Date

The actual fixture date, format is dd/mm/yyyy.

If the fixture is postponed, but not yet rearranged, use P.

Original date

If the fixture is to be or has been rearranged, the date it was rearranged from, format is dd/mm/yyyy

Time

The fixture start time, 24 hour clock, format is hh:mm.

Can usually be left blank for home club to complete.

Division

The short name of the fixtures division – see League Manager – Create divisions.

Venue

The numeric ‘ID’ of the fixtures venue.

Can usually be left blank for home club to complete.

TODO: needs to be more user friendly

Home team/Away team

The home or away team name – a combination of Club name and team number.

One team clubs must have ‘1’ appended as the team number.

Home score/Away score

The home/away team score

Postponed reason

If postponed, the reason for the postponement