0

I have an excel file with more than 500 field. Here is structure of my database

Field       | Type 
id          | int(11)
name        | varchar(250)
description | varchar(250)
...

500 fields like that.

Is any way to convert it to *sql and import to my database ?

David Makogon
  • 69,407
  • 21
  • 141
  • 189
Nguyen Hoang
  • 540
  • 5
  • 25
  • 3
    Possible duplicate of [How to import CSV file to MySQL table](http://stackoverflow.com/questions/3635166/how-to-import-csv-file-to-mysql-table) – hiropon May 17 '17 at 07:51
  • There are lots of ways to read csv files. Just a simple web search of `"read csv php"` yields many good hits. It would then be up to you to take each row in your csv and insert it into your database. – David Makogon May 17 '17 at 07:52
  • You should first decide what columns you need in the database. Then you have to create a table in MySQL with all the columns that you need, beware of the type and length for each column. Then you need to use an PHP Excel library to read the values from the excel file and save them in the database. Have a look here: https://github.com/PHPOffice/PHPExcel – Robert Gabriel May 17 '17 at 08:19

0 Answers0