from:http://hi.baidu.com/harite/item/963e9f3f6fe905637d034b6a
If you want to import the Excel table into the MySQL database,
,
Step One: Select the data you want to import quickly, in addition to one more column, such as:
Step Two: Copy the selected data to a new table workbook, then "Save As"-"Text File (tab split) (*.txt)", if it is stored in the "D:\data.txt" position.
Step three: Build the MySQL database and table based on the data you want to import, and then use the command load data local infile ' D:\data.txt ' into table exceltomysql fields terminated by ' \ t '; Row import operation. Such as:
Now that the data has all been imported into MySQL, let's select a bit,
To this, the data from Excel to MySQL conversion has been completed. Next, the data from MySQL to Excel conversion, the process is actually the use of the "tab split" text file.
You can do this if you want to import the boys ' information from this table into Excel. SELECT * into outfile ' D:\man.txt ' from exceltomysql where xingbie= "male";
In this way, all the boys ' information in the table is output to the text file D:\man.txt file, which ends with a tab segment, ' \ n '. You can open Excel and choose Import data, import external data, and select D:\man.txt to make sure it's all right.