Page 1 of 1

can phpmyadmin import excel files

Posted: Sat Nov 05, 2005 2:57 am
by rami
i have some data in tabular form in excel.
I have designed equal number of columns ,design table in mysql database...
but it has been difficult to insert data one by one

can that excel data directly inserted as data in table
in excel
A B.............
name Age
Harry 12

in mysql table i have
name varchar(25),
age int,.....

can that excel file impoted as data to mysql table
thanks...

and whats about vice versa ...
from mysql table to excel for print...
i am using phpmyadmin....but can use other soft was well if there are any
thanks
if not from any plian text document to mysql table but not giving commands...(insert into ....

Posted: Sat Nov 05, 2005 4:50 am
by patrikG
export from Excel into csv-format (comma separated values) and import it with phpMyAdmin

Posted: Sat Nov 05, 2005 6:22 pm
by rami
patrikG wrote:export from Excel into csv-format (comma separated values) and import it with phpMyAdmin
really thanks i will try
this will solve lot of dataentry problem...

then may be excel can also open that csv file.
thanks

Posted: Sat Nov 05, 2005 7:22 pm
by raghavan20
Just wondering how to read the values from the Excel file to put it as a csv file?

Posted: Sat Nov 05, 2005 9:10 pm
by feyd
use Excel...

Posted: Sun Nov 06, 2005 5:16 am
by raghavan20
Is it any way possible to automate the generation of csv files...
I once had a requirement where I have to read quotes for different products from different suppliers and load them onto Mysql for further processing...this should all happen with the click of a mouse...how do you think this can be done?

Posted: Sun Nov 06, 2005 8:07 am
by RobertGonzalez
CSV is sometimes not the best way to import files. I have tried this before (Excel to MySQL to Excel) and have noticed that sometimes both Apps separate on non-separating commas. For example, if a money field is entered as 12,345 instead of 12345 that field is split into two fields.

I like to lean toward tab separated text fiels for entry into the MySQL tables. phpMyAdmin has a wonderful import tool that will let you choose just about all the parameters available for importing. It is usually located on the import tab when viewing a table.

To automate the process have a look at the phpMyAdmin import code and see if you can't develop something along those lines.