Forum Moderators: open

Message Too Old, No Replies

Import data from Excel file into phpMyAdmin

         

yllai

1:39 am on Apr 7, 2006 (gmt 0)

10+ Year Member



Can we import data from excel file into phpMyaAdmin? How to do it? Anyone know?

ikkyu

1:57 pm on Apr 7, 2006 (gmt 0)

10+ Year Member



Yes you can, save it as a Comma Separated Value(.csv) file. Open up PHPmyAdmin and I believe you have to have a corresponding table that has the same amount of fields that you have in your spreadsheet. Get into the database then into the matching table and click on import. Open up the .csv file and choose the CSV format. Here you have to match the way excel formatted the file, how the fields are terminated, enclosed in quotes, etc. It might take several attempts to do so I suggest doing it a test database first.

Come to think of it you might be able to just create a table a dummy field, and choose "replace table data with file" - what I *think* happens here is it will take the first line of your .csv file and make it the names of the fields. Again test it first.

It was only a couple of weeks ago that I did this and I forgot how exactly I did it. Having a senior moment;)