CSV File Format

The CSV file formats are simple, but formatting errors are the source of most import problems. I suggest you start by downloading the sample files. Import the one that appears closest to your needs first. When that is working, modify it to suit your needs.

The CSV file format starts with a “header row” (the first row of the file) that defines the meaning of each of the columns, then contains one or more rows, each of which will become a data table row (a player). The SPELLING of the header row entries IS VERY IMPORTANT; it MUST be correct. The order of the columns is not important.

TEAMS CSV FILE FORMAT

A Team Roster in CSV import file format contains the following fields:

team_name – THIS FIELD SHOULD ALWAYS BE PRESENT. But if it’s missing, the import function will attempt to use the team_slug field as the team’s name.

team_slug – If present, it will be used as the team slug. If missing, the import function will create a slug from the team_name field.

team_description – Fills the taxonomy’s Description field for the team (term).

ss_team_link – Links the Team Rosters team to a team in the MSTW Schedules & Scoreboard teams table. This field must be the SLUG for a team in the MSTW Schedules & Scoreboards teams table. It is not verified on import, but it won’t work if it’s not a valid slug. Note that this field is NOT created by the MSTW CSV Exporter when exporting Team Rosters 3.1.2 data because it did not exist in version 3.1.2. You can add the column to a teams CSV file should you so desire. To reiterate, this column contains SLUGS for teams in the MSTW Schedules & Scoreboards Teams table.

lm_team_link – Links the Team Rosters team to a team in the MSTW League Manager teams table. This field must be the SLUG for a team in the MSTW League Manager teams table. It is not verified on import, but it won’t work if it’s not a valid slug. Note that this field is NOT created by the MSTW CSV Exporter. You can add the column to a teams CSV file should you so desire. To reiterate, this column contains SLUGS for teams in the MSTW League Manager table.

PLAYERS CSV FILE FORMAT

The PLAYERS CSV file format contains the following fields. The Loading Rosters from CSV Files man page describes the interactions between the player_title, player_slug, player_first_name, and player_last_name fields.

player_title -The player title (the player CPT title) is used on the admin side only.

player_slug – The player slug. The software will attempt to create this field if it is missing.

player_photo – The URL of a photo file for the player. This field is discussed on the Loading Rosters from CSV Files man page.

player_teams – A semi-colon separated list of team slugs. (A player can be on more than one team.) This field is discussed on the Loading Rosters from CSV Files man page.

The following fields fill the corresponding fields in the players table, and require no further explanation:
player_first_name
player_last_name
player_number
player_height
player_weight
player_position
player_position_long
player_year
player_year_long
player_experience
player_age
player_home_town
player_last_school
player_country
player_bats
player_throws