I want to do something really simple. I just want to export excel data to a CSV in order to put it in a Mysql DB.
It is a huge excel so I can't manage exceptions easily.
My problem is that when I save my xslx into csv, it put me the " to separate columns only if there is a comma in the column or if there is already a " so I have something like that in my CSV :
col1 | col2 | col3 => col1,col2,col3
col1 | co,l2| col3 => col1,"co,l2",col3
col1 |"col"2| col3 => col1,"""col""2",col3
col1 | | col3 => col1,,col3
So I tried a lot of tings to convert it for SQL but i don't find a good way.
I work in Excel 2007 and SQL want to CSV to have this config:
Columns separated with: ,
Columns enclosed with: "
Columns escaped with: \
Lines terminated with: auto
LOAD DATA LOCAL INFLILEhas aCOLUMNS SEPARATED BYargument you can use without even converting.