CSV File Format

Comma Separated Value (CSV) files are normally created in Microsoft Excel, or a similar spreadsheet program, and saved in CSV format. Sample .csv files are located in the plugin’s csv-examples folder. I recommend viewing, editing, and testing import with these files first. The .xlsx files in MS Excel format. Each row in the file corresponds to a game and each column corresponds to a meta data field in the scheduled-games custom post type. (NOTE that you probably want to edit the .xlsx files, then save in .csv format. If you open the .csv files with Excel, it will mess with the format of the date and time fields. Open the .csv fields in a text editor, like Notepad, to see the actual format.)

See the end of this page for important information about importing CSV Import into version 4.0.

Minimum Required Schedule Info (columns)

The minimum amount of information (columns) required is a follows:

Opponent. The opponent field is used to great the post title and slug. It is required.

Date. The game date in the format YYYY-MM-DD. For example, “2013-04-07”. It is required.

Time. The game time in the format HH:MM[:SS] in 24-hour time format. For example, 1:00pm is 13:00. Imports just work better if you include a time column. All times can be “TBA” (or “T.B.A.” or “TBD” or “T.B.D.”).  NOTE that the time column must come AFTER the date column.

Location. The game location. Imports just work better if you add a Location column. All locations can be “T.B.D.” or any of the above entries. Note that this entry goes in the ‘custom’ location field. Locations selected from the Game Locations Plugin cannot be imported from CSV files.

Other Schedule Info (columns)

The remaining columns, which correspond to fields in the Add/Edit Game screen, are optional based on your requirements.

Home Game. Indicates a game is a home game. Use 1 for home and 0 for away.

Opponent Link. A URL that will be added as a link on the opponent field.

Result. The result or score of the game. For example, W 35-27.

Location Link. A URL that will be added as a link on the location field. Note that this entry goes in the ‘custom’ location link field. Locations selected from the Game Locations Plugin cannot be imported from CSV files.

Media Label [1|2|3]. The label for one of the three media entries.

Media URL [1|2|3]. A URL that will be added as a link on the corresponding Media Label.

CSV Import in Version 4.0

There is no capability to import the version 4.0 Teams and Schedules databases. (That will likely come in version 4.x.) If you are using the new structure for Teams, Schedules, and Games in version 4.0, import the following minimal data for your schedule: Game Date, Game Time, Opponent, and Home Game. Don’t use a location if you are using the Teams DB with home location in the Locations DB. Any location you import will override the team’s home location data from the Teams DB. After import, go into the Games Database and you should see the opponent in the Game Opponent field. Select this opponent from the Teams DB using the Select Opponent pull down list provided.