Easy to do without code, refer to Http://jingyan.baidu.com/article/fc07f9891cb56412ffe5199a.html
1.excel turn MySQL
A. First confirm what your database is encoded, take utf-8 as an example,
B. You first open the Excel file, the file is listed as standard,
Then save and select Save As. csv file.
C. Then open the. csv file with a text editor (Sublime) and Save as Utf-8 csv (file->set file Encoding to UTF-8)
D. Open Navicat for MySQL to find the table to insert
Click the Import button to select the. csv file
Figure (1)
Select the corresponding. csv file in the indicated area
Figure (2)
Column name line: Figure 5 The number of rows in the Excel table used to select the corresponding number of columns
First row of data: Import MySQL data from a few lines in an Excel table
Figure (3)
Red indicates the option to import the table
Figure (4)
Select the number of columns in the Excel table that the import database corresponds to
Figure (5)
Click Next to import.
2.Mysql Data Export Excel
Open the table you want to export data with Navicat for MySQL, click the export icon below
Select the Excel file (*.xls) option, which you can do as prompted.
Figure (6)
Convert Excel and MYSQ l databases to each other