Step 1 of Excel data and MySql data conversion:
Select the data to be imported and add one more column,
Step 2:
Copy the selected data to a new table, and then save it as a text file (tab Division) (*. txt ).Ta.txt.
Step 3:
Create a MySql database and table based on the data to be imported, and then use the command
Load daTa local infile 'd: daTa.txt 'into table exceltomysql fields terminated by't ';
Import.
Now all the data has been imported into MySql,
Let's select it,
By now, the data has been converted from Excel to MySql.
Next, the process of converting data from MySql to Excel is actually a text file separated by a tab.
If you want to import the boy information in this table to Excel, you can.
Select * into outfile 'd: man.txt 'from exceltomysql where xingbie = "male ";
In this way, all boys' information in the table is output to the text file D: man.txt separated by tabs and ended with 'n.
You can open the Excel file, select "data"> "import external data"> "import data", select "D: man.txt", and click OK.
Well, we have passed this method, but the feasibility is acceptable, but we still encounter a problem, that is, when we import data with Chinese characters, the field in the database cannot be displayed, A little garbled, but many of them are empty. I don't know why. the attribute of the field is varchar. that's right. so this problem is not solved, so we have to change it again !!! Thank you for your advice !!!