how to import from MS excel into MYSQL DB [duplica

2020-02-06 08:44发布

How do I import data from MS excel and insert in to MYSQL database ? Which language is easiest and fastest to do this task ?

标签: mysql excel
4条回答
够拽才男人
2楼-- · 2020-02-06 09:18

If you can safely represent everything in a CSV format (just export from Excel) then you need only one command:

LOAD DATA INFILE '/tmp/coolfile.txt' INTO TABLE coolTable; 
查看更多
We Are One
3楼-- · 2020-02-06 09:21

Not really a programming question, the fastest method I would suggest is export data from Excel to CSV-file, and then import it into MySQL using LOAD DATA INFILE command.

http://dev.mysql.com/doc/refman/5.1/en/load-data.html

查看更多
手持菜刀,她持情操
4楼-- · 2020-02-06 09:22

In Windows, you can use phpMyAdmin's import feature. It has many options including import from Microsoft Excel!

查看更多
做个烂人
5楼-- · 2020-02-06 09:33

I would use the swiss army knife of data manipulation in the windows world:

MS Access

Import the Excel sheet into an Access table, and export the table over ODBC to MySQL

查看更多
登录 后发表回答