tags:

views:

406

answers:

3

I have an excel file that i need to get into CSV. I export it fine but when I go to import it into a mysql db via phpMyAdmin i get a "Invalid field count in CSV input on line 1.".

Problem seems to be that the fields are not enclosed by double quotes. I just migrated to MS Excel 2007 and am not sure how to manipulate the CSV save options so that there are double quotes around the fields so my DB doesn't throw a conniption when i try to import.

Any suggestions? I'm fairly new at going from EXCEL to CSV but have gotten it to work previously.

Thanks

A: 

There should be an MS-DOS format of CSV in your export drop down. Pick that one.

Spencer Ruport
A: 

There should be an option in save-as advanced properties or something, but if not, you could always change the delimiter character to : or ; or | and then write a quick perl script to convert it to a quote-and-comma file.

Or you could just try a tab-separated-value file instead, I think phpMyAdmin will read TSVs as well.

John
A: 

use dbtube.org and the native Excel format. It is not necessary to convert your sheet.

It's a PHP base web application which looks like iTunes.

Timo Hellhagen