(Transferred from HTTP://HI.BAIDU.COM/HARITE/ITEM/963E9F3F6FE905637D034B6A)
Today is the national mathematical modelling competition, the classmate selected a topic needs to a large Excel table to carry on the statistic, the good friend son ~ ~ then helped him to complete the data from Excel to the MySQL transformation. Write down the specific steps to share to everyone, also lest everyone to the Internet everywhere search.
If you want to import the Excel table into the MySQL database,
,
Step One: Select the data to be imported fast, in addition to a column, such as: Step Two: The selected data quickly copied to a new table workbook, and then "Save as"-"Text File (tab split) (*.txt)", if the "D:\data.txt" in this 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. For example: Now that the data has all been imported into MySQL, let's select a bit, so that 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" so that all the boys in the table are output to a text file that ends in a tab-delimited, ' \ n ' message d:\ The Man.txt file. You can open Excel and choose Import data, import external data, and select D:\man.txt to make sure it's all right. Finally, good luck, ~~yours.
Manual Excel data and MySQL data conversion