1.excel data Warehousing MySQL
First prepare the Excel file,
Red Place to pay attention to, one is the field name of the row, a table name corresponding page;
Then private MySQL tool navicat, select the database, and then import the file,
Select the appropriate execl file to import.
The column name line corresponds to the row in the Excel file where the field name is located.
The first data row corresponds to the row in the Excel file where the first row of data resides.
------------------------------------------------------------------------------------------------------------Dividing line---------- --------------------------------------------------------------------------------------------------------------- ------
2.mysql table data, importing Excel files
Method 1: You can also use the Navicat tool directly to import data into Excel files;
Method 2:
You can use SQL "SELECT * from Sys_user to outfile '/data/user.xls '",
Then useiconv -futf8 -tgb2312 -user.xls user1.xls 来改变编码(若失败,也可下载excel文件到本地,使用记事本打开,改变编码,另存.)
You can then open it using Excel.
Method 2 Some ribs.
------------------------------------------------------------------------------------------------------------Dividing line---------- --------------------------------------------------------------------------------------------------------------- ------
Method 1 in 1 and 2 is suitable for operation and maintenance personnel,
For situations with special needs, developers can use Apache's poi to write data from the database to an Excel file, or get data from an Excel file and write to the database.
Excel data inbound MySQL and MySQL data into Excel files