Blog Search
Latest Posts
New Educational Media Website Launch
Trevor Laurency Fitness Website Launch
Recent Recommended Links - April 2008
Web Apps on Your Desktop with Mozilla Prism
Recent Recommended Links - March 2008
Ubuntu Linux - Persistent sudo root
Controlling PHP Register Globals Using .htaccess File
Javascript Essentials - Date Pickers (Calendars)
New Acuras Website Coming Soon
Blog Archive
Browse by Subject
AJAX
Apache
CMS
CSS
HTML
Java
JavaScript
Links
Linux
Mac
MySQL
Pascal
PHP
postgreSQL
RSS
Ruby
SEO
Web Dev News
Windows
XML
Other Resources
Computer Science Student Articles
Tutorial: Importing Excel Data to MySQL using phpMyAdmin
Published: 11th May 2007
Revised: 11th May 2007
After logging into phpMyAdmin, you should see a dropdown box on the left of the page under "Database". Click on the dropdown and select the appropriate database. If you have no databases in the list you may be able to create one through phpMyAdmin depending on your user privileges. After selecting a database, you should now be able to see a list of tables on the left menu as well as in the main window.
Before importing any data you need to set up your Excel spreadsheet(s) appropriately. Each Excel spreadsheet should correspond to a table in your database. In your Excel spreadsheet(s), make sure you create the same number of columns as exist for the corresponding database tables and make sure the columns are in the same order as shown by the phpmyadmin interface.
Whenever you want to upload your data into the database, export / save your 3 spreadsheets using the Comma Seperated Values (CSV) format. This will enable you to import the data into the database.
To import data into a database table you firstly need to click on that table's name in the phpmyadmin interface. You then need to click on "Import" at the top of the main window. This provides the interface through which you can upload data to the table you have selected.
Click on "Browse..." to locate the .csv file you wish to upload. Then select "CSV" as the Format of imported file. Under CSV options, "Fields terminated by" should be changed to a comma. "Column names" can be left blank (assuming your Excel spreadsheet contained the same columns in the same order as the corresponding database table). Click on "Go" and the file will be imported.
If after trying to import a load of data you see that it has not worked as you had expected, you can delete all the records in the table and start afresh by clicking on "Empty" at the top of the main window. You can then proceed to upload an amended .csv file again.
If you run into difficulties you may wish to consider our MySQL Database and PHP Programming services. Feel free to Request a Quote for technical assistance.
Thanks for reading! Bye for now...
Related Links
Related Articles / Posts
Recent Recommended Links - April 2008 (11/04/2008)
Recent Recommended Links - March 2008 (16/03/2008)
Tutorial: Importing Excel Data to MySQL using phpMyAdmin (11/05/2007)
MySQL Graphical Administrative Interface and GUI Designer Tools (20/04/2007)
PHP: Use mysql_insert_id() To Get The Last Entered Auto Increment Value (06/04/2006)


