• Resolved twhitaker

    (@twhitaker)


    Hi – I’ve been trying to diagnose an import issue for several hours now – hoping you can provide some guidance.

    I’ve narrowed the problem to a column called “ev_hours” that’s set as a text area field and I’m importing data that looks like this

    "Mon-Fri: 05/02/2022 - 05/06/2022 07:30 AM - 05:00 PM
    Sat: 05/07/2022 - 05/07/2022 09:00 AM - 05:00 PM
    Mon-Fri: 05/09/2022 - 05/13/2022 07:30 AM - 05:00 PM
    Sat: 05/14/2022 - 05/14/2022 09:00 AM - 05:00 PM
    Mon-Fri: 05/16/2022 - 05/20/2022 07:30 AM - 05:00 PM"

    I can import one row of that data without a problem. If I have that same value in the first 10 rows though I get this error:

    “Incorrect column name found in CSV:

    county,early_vote_location,early_vote_address,ev_hours

    Cannot import data. Make sure all field names are correct in the CSV header.”

    Any tips? Thank you in advance!

    Thomas

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter twhitaker

    (@twhitaker)

    Here’s an example screenshot of the spreadsheet I’m working with in 2 versions. The file with just one value in column D works, but the file with that same value for every row doesn’t work.

    View post on imgur.com

    Plugin Author Roland Barker

    (@xnau)

    I tried to duplicate the problem you’re seeing there and I couldn’t, so I’m pretty sure the problem is with your CSV file. 

    What you can do is after exporting the CSV file, check it in a plain text editor to make sure the syntax is correct.

    The issue you’re seeing with the CSV files and the error message you’re getting don’t match, so first thing is to make sure the header line is correct, since that is what the error message refers to.

    When exporting data to a CSV from a spreadsheet, the spreadsheet app is supposed to enclose blocks of data that contain line returns (such as what you’re showing there) so that the line returns in the data are not taken as a new line in the CSV. What I suggest you do is make sure the spreadsheet app is getting that part right: each block of data that has line returns must be enclosed in double quotes. The fact that it has problems when the CSV has multiple lines with that block of data suggests that the spreadsheet app isn’t getting the enclosures right.

    Thread Starter twhitaker

    (@twhitaker)

    Thank you! I checked in a text editor and the csv looked correct with the right enclosures.

    I did figure it out though by playing with the import settings that I was just overlooking. Once I changed the enclosure and delimiter options from “AUTO” to ” and , that fixed it. Maybe since some ev_hours fields had the enclosures and others did not (due to the one line vs multiple lines) maybe that threw off the AUTO option being able to pick up the enclosure? Thanks for the help.

    Thomas

    Thread Starter twhitaker

    (@twhitaker)

    Marking as solved

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Help with import please’ is closed to new replies.