日期:2014-05-18  浏览次数:20649 次

如何把EXCEL表导入mysql?
把EXCEL表导入mysql并且要求一行一行的读出来。

------解决方案--------------------
SQLyog 客户端 提供把CSV 文件导入mysql
------解决方案--------------------
http://lavasoft.blog.51cto.com/62575/36841
在mysql命令行导入文本:
 
D:\mysql-5.0.45-win32\bin>mysql -uroot -pleizhimin
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.0.45-community-nt MySQL Community Edition (GPL)
 
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
 
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| test |
| testdb |
+--------------------+
6 rows in set (0.02 sec)
 
mysql> use test
Database changed
mysql> LOAD DATA LOCAL INFILE 'C:\Book1.txt' INTO TABLE hy_dm;
Query OK, 1205 rows affected, 32 warnings (0.34 sec)
Records: 1205 Deleted: 0 Skipped: 0 Warnings: 32
 
mysql>
 
4、在SQLyog中查看导入数据,哈哈,成功了,看下图。



图片到网址中去看吧 呵呵

快给分吧

------解决方案--------------------
直接用软件转吧,省不少功夫
http://down.chinaz.com/soft/15481.htm

------解决方案--------------------
jxl有相应的操作EXCEL的API