This question already has an answer here:
这个问题在这里已有答案:
- How to import an excel file in to a MySQL database 9 answers
- 如何将excel文件导入MySQL数据库9答案
How do I import data from MS excel and insert in to MYSQL database ? Which language is easiest and fastest to do this task ?
如何从MS excel导入数据并插入MYSQL数据库?哪种语言最简单,最快速地执行此任务?
4 个解决方案
#1
6
If you can safely represent everything in a CSV format (just export from Excel) then you need only one command:
如果您可以安全地以CSV格式表示所有内容(只需从Excel导出),那么您只需要一个命令:
LOAD DATA INFILE '/tmp/coolfile.txt' INTO TABLE coolTable;
#2
3
I would use the swiss army knife of data manipulation in the windows world:
我会在windows世界中使用瑞士军刀进行数据操作:
MS Access
MS Access
Import the Excel sheet into an Access table, and export the table over ODBC to MySQL
将Excel工作表导入Access表,并通过ODBC将表导出到MySQL
#3
2
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.
这不是一个编程问题,我建议的最快的方法是将数据从Excel导出到CSV文件,然后使用LOAD DATA INFILE命令将其导入MySQL。
http://dev.mysql.com/doc/refman/5.1/en/load-data.html
http://dev.mysql.com/doc/refman/5.1/en/load-data.html
#4
1
In Windows, you can use phpMyAdmin's import
feature. It has many options including import from Microsoft Excel!
在Windows中,您可以使用phpMyAdmin的导入功能。它有很多选项,包括从Microsoft Excel导入!
#1
6
If you can safely represent everything in a CSV format (just export from Excel) then you need only one command:
如果您可以安全地以CSV格式表示所有内容(只需从Excel导出),那么您只需要一个命令:
LOAD DATA INFILE '/tmp/coolfile.txt' INTO TABLE coolTable;
#2
3
I would use the swiss army knife of data manipulation in the windows world:
我会在windows世界中使用瑞士军刀进行数据操作:
MS Access
MS Access
Import the Excel sheet into an Access table, and export the table over ODBC to MySQL
将Excel工作表导入Access表,并通过ODBC将表导出到MySQL
#3
2
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.
这不是一个编程问题,我建议的最快的方法是将数据从Excel导出到CSV文件,然后使用LOAD DATA INFILE命令将其导入MySQL。
http://dev.mysql.com/doc/refman/5.1/en/load-data.html
http://dev.mysql.com/doc/refman/5.1/en/load-data.html
#4
1
In Windows, you can use phpMyAdmin's import
feature. It has many options including import from Microsoft Excel!
在Windows中,您可以使用phpMyAdmin的导入功能。它有很多选项,包括从Microsoft Excel导入!