-3

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 (http://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 Baker Mar 12 '13 at 07:50
  • You need to first read that excel file data and then try what u want..add more info – swapnesh Mar 12 '13 at 07:50

2 Answers2

1

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.

Vijay Verma
  • 3,660
  • 2
  • 19
  • 27
0

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:

John Woo
  • 258,903
  • 69
  • 498
  • 492