import an excel file to a mysqldb table

hello

i want to import the data in an excel file to a mysql table. i'm using mysql administrator tool. is there a way i can populate data through an excel file ?

thanks very much for your reply !

lilyyan
lilyyanAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Aleksandar BradarićSoftware DeveloperCommented:
I think your only options is to save your Excel file in the CSV format. This file can be then imported into the MySQL table using the LOAD DATA INFILE command (see details here: http://dev.mysql.com/doc/refman/5.0/en/load-data.html).

0
NelliosCommented:
You can save the data to a csv file from excell and then use load data infile.
Example:

LOAD DATA LOCAL INFILE   'PathToCSVFileName'  IGNORE INTO TABLE TableName
           FIELDS TERMINATED BY ';' LINES TERMINATED BY '\\n';

The statement may differ depending on the delimeter you use. I assume you use semicoln.
0
lilyyanAuthor Commented:
Hi, thanks for all replies.
well
1st question is, i dodn't have ftp permission for  the mysql production server i'm using. will  this be an issue?

2nd,  i don't have a home directory on the production server either. (same for other users)

i'm thinking...
first  import the excel file (  turn it into .csv file) into the mysql server on my pc. then do a back up, then restore on the production server. will this work ? please give me some hint. thanks so much.

0
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

Aleksandar BradarićSoftware DeveloperCommented:
> 1st question is, i dodn't have ftp permission for  the mysql production server i'm using. will  this be an issue?

No - you'll just have to use phpMyAdmin to insert the data.

> 2nd,  i don't have a home directory on the production server either. (same for other users)

Same here - phpMyAdmin is your tool. No need to use FTP to upload the file - you have a screen in phpMyAdmin which allows you to upload the file.

Yes it will work. Not sure what kind of hint you need - it's more or less straight forward...
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
lilyyanAuthor Commented:
hi, thanks for the reply. i'm using Mysql Administrator tool. will this be the same as phpMyAdmin ?
0
NelliosCommented:
If you use LOCAL DATA INFILE there is no need to upload the files to the database server, as long as you connect to mysql directly from your pc, in the case of phpMyAdmin this is not applicable.

Short work around:
1) Install mysql on your local machine.
2) Run the process localy
3) Dump the database to an sql script.
4) Run it usinh phpMyAdmin or whatever tool you like.

Hope that helps
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
MySQL Server

From novice to tech pro — start learning today.