Page 1 of 1

export data from csv or excel file to Mysql in PHP

Posted: Sat Apr 08, 2006 5:03 am
by deeppak
i want to export the data from a csv or exel file to mysql data base in php plz provide me the solution or code for this

three approaches can be there

a.) first upload a file through php code and then tranferring the data to mysql database.
b.)second the file is still on the client and i dont want the file on the server i just wants its data to be imported to mysql database.
c.)I upload the file through some ftp tool to the server and from there i am entering the data to mysql database.

speedy assistance is soliciated

Thanx

Posted: Sat Apr 08, 2006 8:19 am
by feyd
fgetcsv(), and pear has a proposed package to read Excel files.

As for providing you with a solution: no, this is a learning place not a code repository or place to request all the work be done for you.

Posted: Sat Apr 08, 2006 12:55 pm
by RobertGonzalez
Take a look at phpclasses.org. They have quite a few classes there.

Posted: Tue Apr 11, 2006 4:00 am
by wyred
You can upload the data in a .csv into a table using phpMyAdmin.