This is a discussion on Excel to mysql within the Database Support forums, part of the Web Development category; Hi, How to insert the data from excel to mysql table? Regards, S.Ashokkumar...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| Hi, How to insert the data from excel to mysql table? Regards, S.Ashokkumar |
|
#2
| |||
| |||
| hi pal, it is not possible directly convert excel to mysql server,becoz mysql only convert text file data or csv data into mysql server. Here.... 1.as per my idea,first convert excel into text file or csv file by php,becoz there is no predefined function or reserved function in mysql 2.finally we feed the data into mysql Thanks, Prasath.k |
|
#3
| |||
| |||
| Hi, How to load the data to mysql from CSV / Text file? Give the example..... Regards, S.Ashokkumar |
|
#4
| |||
| |||
| Hi, we can get csv or text file from php developer then place the csv file or text file in server host Finally,run the below coding DROP TABLE IF EXISTS bio_test_gastric; CREATE TABLE bio_test_gastric( `Therapeutic_Area` varchar(100) default NULL, `Indication` varchar(100) default NULL, `Biomarker` text, `Journal_Reference` text, `Summary` longtext ) ENGINE=MyISAM DEFAULT CHARSET=latin1; LOAD DATA INFILE'/home/www/htdocs/stylelog/test/jeyaseelan/Excelreader/biomarker_master_06222007_Gastric.txt' INTO TABLE bio_test_gastric FIELDS TERMINATED BY '[##]' ENCLOSED BY '"' LINES TERMINATED BY '\t\n'; [##]-> for field termination "" -> for field enclosing \t\n -> for line termination Those are specify in text file Thanks, Prasath.K |
|
#5
| |||
| |||
| Hi, Code: mysql> LOAD DATA INFILE '<FilePath>' INTO TABLE pet<Your_TableName> FIELDS TERMINATED BY '/t'; Query OK, 9 rows affected, 20 warnings (0.00 sec) Records: 9 Deleted: 0 Skipped: 0 Warnings: 20 mysql> select * from pet; +--------+--------+---------+------+------------+------------+----+ | name | owner | species | sex | birth | death | id | +--------+--------+---------+------+------------+------------+----+ | Fluffy | Harold | cat | f | 1993-02-04 | | 28 | | Claws | Gwen | cat | m | 1994-03-17 | | 29 | | Buffy | Harold | dog | f | 1989-05-13 | | 30 | | Fang | Benny | dog | m | 1990-08-27 | | 31 | | Bowser | Diane | dog | m | 1979-08-31 | 1995-07-29 | 32 | | Chirpy | Gwen | bird | f | 1998-09-11 | | 33 | | Whist | Gwen | bird | | 1997-12-09 | | 34 | | Slim | Benny | snake | m | 1996-04-29 | | 35 | | | | | | | | 36 | +--------+--------+---------+------+------------+------------+----+ 9 rows in set (0.00 sec)
__________________ -Murali.. |
|
#6
| |||
| |||
| Hi, can we convert excel data into mysql database not using php????? Thanks, Prasath.K |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Importing data from excel to MYSQL | komal.kukreja | PHP Programming | 1 | 06-26-2009 10:54 PM |
| Extracting excel data into the mysql data using php | boylekim | PHP Programming | 0 | 12-29-2008 09:48 AM |
| Importing MS Excel Data into a MySQL database using PHP | jamilvoss | PHP Programming | 0 | 12-26-2008 11:33 AM |
| jdbc with excel | krishnakumar | Java Programming | 30 | 09-13-2007 02:48 AM |
| upload excel | shaalini | PHP Programming | 1 | 07-10-2007 11:46 PM |
Our Partners |