• Hi, looking forward to trying your plug-in for American College Football Bowl games.
    My problem is that I cannot get the Matches screen to import the csv file.
    My error reads: “Imported csv file should contain 5 columns (header contains 1 columns). See help page for the correct format.”

    My txt/csv is in the format:
    play_date;home_team;away_team;stadium;match_type
    12/21/13;ColoSt;Wazzu;NewMex;
    12/21/13;USC;Fresno;LasVegas;
    12/21/13;UB;SDSU;Idaho;
    12/21/13;ULL;Tulane;NewOrleans;

    I have repeated this format with commas (not semicolons). I have attempted to load the file as both a *.txt and a *.csv file. All are met with the same response.

    What am I missing?
    {Perhaps is an example csv file was linked, I could just follow your template.}

    Thanks, looking forward to working with this,
    Mike

    https://www.ads-software.com/plugins/football-pool/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author AntoineH

    (@antoineh)

    The /upload folder in the plugin contains an example of a text file. Another way of generating an example csv is to add at least one match via the admin screens and then export the game schedule to create a template.

    Most of the times the ‘only one column’ error is caused by an empty line before the header line, or a wrong file format (use a ‘real’ text editor like notepad++); PHP is a bit picky about that.

    Your data misses a match_type (create at least one, e.g. “American College Football Bowl” for the whole season, or a match type per week, month or so). And the date column should be in the following format yyyy-mm-dd hh:ii.
    If you want to use spaces in the data, make sure you enclose that string with double quotes (e.g. “Las Vegas”.

    Hope this helps.

    Thread Starter kanick

    (@kanick)

    i’ve done precisely as you said (textwrangler is legit) and used semicolons. now the error says:
    Imported csv file should contain 18 columns (header contains 124 columns). See help page for the correct format.

    so now i will try to do 18 columns and will let you know if that fixes it. but i think the prob may be on the code side.

    (separately, would be nice if the date format were not so rigid.)

    thanks.

    Plugin Author AntoineH

    (@antoineh)

    I think the problem is the line-ending used in the file. If PHP can’t read the line ending, then the whole file is regarded as one line. Try to save the file in Unix format.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘CSV file won't load.’ is closed to new replies.