Does any body know how to import excel data into mysql using php? not the csv format upload.
-
Either save it as CSV in MS Excel, or use one of the many PHP Excel reader libraries (stackoverflow.com/questions/3930975/alternative-for-php-excel) to convert it.... but try doing some work yourself; or hire a professional if you want someone to write it for you– Mark BakerMar 12, 2013 at 7:50
-
You need to first read that excel file data and then try what u want..add more info– swapneshMar 12, 2013 at 7:50
2 Answers
You have to be follow following steps: 1)Upload excel file to server. 2)Write script to read excel file via php file handling tools. 3)Insert read data in appropriate database table.
Try saving the excel file into CSV
, then execute this command,
LOAD DATA LOCAL INFILE 'yourfullpath.csv'
INTO TABLE database.table
FIELDS TERMINATED BY ';'
ENCLOSED BY '"'
LINES TERMINATED BY '\r\n';
Other Links:
-
no csv please ...I want it in the Excel format it self...Thank you Mar 12, 2013 at 8:08