Excel data inbound MySQL and MySQL data into Excel files

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.