If your excel file is in CSV format you can do the following
1. In PHP you can use fgetcsv command to process and try insert into mysql on help of mysql commands
2.The best method is try using the following mysql statement
[PHP]
LOAD DATA LOCAL INFILE '/importfile.csv'
INTO TABLE test_table
FIELDS TERMINATED BY ','
LINES TERMINATED BY '\n'
(field1, filed2, field3);
[/PHP]
Can any one help in importing database from excel sheet to PHP?
Bye,
Sound.
Do you want to import a database FROM an Excel sheet INTO PHP? Obviously not. So it is either:
- import an Excel sheet (not all cells) into a MySQL database table using PHP
- import an Excel sheet (all cells) into a MySQL database table using LOADFILE
- export a MySQL table into an Excel XML sheet using PHP.
Comment