CSV file

  • Started
  • Last post
  • 3 Responses
  • ssm

    Hi people,

    Received a CSV file from a client, basically i contains all their contact list. I am attempting to import this into MySql via phpMyadmin, the only problem is that the client has seperated contact field with a comma, there are 1,000+ contact with 5 fields, that pretty much 5,000+ commas.

    Arrrgggh, can anyone save me from a weekend of commas, is there an easy way to automatically add commas to the end of each field, I also have the original Excel file (XLS) which I am thinking could be helpfull, each field is in its own column.

    HELP.

  • UndoUndo0

    import the file into flash and use the string replace function assuming you want to replace the commas with something else??

  • sparker0

    import the file into flash and use the string replace function assuming you want to replace the commas with something else??
    UndoUndo
    (May 13 05, 10:02)

    flash???? what the fuck.

    first off, phpmyadmin lets you pick the field seperator. if it's commas use commas, if not then change the variable...

    second of all, if you have the excel file just export is as cvs again and format it to fit your database table.

    other than that a string replacement at the command line on the *nix server should take a whole 30 seconds.

    ...

  • ssm0

    Cheers sparker. flash??? I'll second that what the....

    Thanks.