Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

XLS to SQL [help me plx]

Name: Anonymous 2007-02-14 16:04

im looking for a FREE program that will convert an excel spreadsheet to sql for easy uploading / updating.

ive tried the csv method and works fine for numbers and short text. but a lot of my cells contain commas and other weird characters.

anything free out there?
or any other method?

Name: Anonymous 2007-02-14 19:12

No need for additional software, MySQL does that, LOAD DATA INFILE. Check the docs at dev.mysql.com:
http://dev.mysql.com/doc/refman/5.0/en/load-data.html

If you're not using MySQL as your database, install MySQL (it takes 5 minutes if you're new, 25 seconds if you know what you're doing), use MySQL to LOAD DATA INFILE, then use the mysqldump utility to obtain an SQL dump of it.

Name: Anonymous 2007-02-14 19:14

>>2
Ah, wait, I hadn't read your post. I just saw the words "excel", "sql" and "csv" at a glance.

Still, no problem with commas. Just export to CSV (careful in Excel 2003, I've heard Microsoft fagged up CSV export and hid it somewhere because people were using it to make Excel data portable). The CSV file should enclose shit with ", and use \ to escape. , to separate fields and EOL to separate rows. MySQL supports that.

Name: Anonymous 2007-02-14 20:14

>>3

I thought the CSV standard used a double-double quote to escape an embedded double quote.  No other character needs escaping since the double quotes delimit the fields.

http://en.wikipedia.org/wiki/Comma-separated_values

Wikipedia seems to agree.

Name: Anonymous 2007-02-15 4:04

>>4
Ah ok. Then say so to MySQL.

Name: Anonymous 2007-02-15 4:04

>>5
Again, I suffer from premature post. Just to clarify, "say so" to MySQL with the LOAD DATA INFILE options, not to the company.

Name: Anonymous 2007-02-15 6:34

>>1

Get a copy of MSDE 2000 and use the data transformation services

Name: op 2007-02-15 18:08

i think the foul up had something to do with excel`03 and my own errors. got `07 and csv worked no problem. however it lacks foreign char. not a big deal.

and ive been using phpmyadmin etc.

thanks

Name: Sgt.Kabu䨺묖kiman僽뱑 2012-05-28 22:34

Bringing /prog/ back to its people
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy

Don't change these.
Name: Email:
Entire Thread Thread List