PDA

View Full Version : Data Dump: Excel -> mySQL



WildSeeker
04-13-2004, 10:57 PM
Greetings -

I have an Excel spreadsheet containing data that I would like to load into a mySQL database. The data will be imported from a single file into a single table. Is there a way to use PHPmyadmin for this task? If so, how? If not, how can I go about doing so?

Any help with this would be greatly appreciated.

ChrisRC
04-14-2004, 08:47 AM
You can.

First, set up the structure of the table in MySQL.
Then save the Excel file as either comma seperated or tab seperated text file.

In MySQL, go to your table properties
go to the SQL tab
near the bottom of the SQL page is a link to "Insert data from a textfile into table" click that.
You can adjust these settings as needed but your "fields terminated by" will be either , for a csv or \t for a tab delimited file. Lines terminated by should default to \r\n which is correct.

Browse to the location of your file, then hit submit.

Note that these instructions are based on phpMyAdmin 2.5.6-rc1, although I don't think this task has changed much in a few versions.

cristiu
09-24-2004, 01:52 PM
You may use MySQLFront is tool trough you can do this very easy www.mysqlfront.de