INFORMATICS

The Best

How to retrieve data from MySQL to EXCEL

Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive
 

How to retrieve data from MySQL to EXCEL

Charge connector odbc
http://dev.mysql.com/downloads/connector/odbc/
Install ODBC in system
mysql-connector-odbc-5.2.4-winx64.msi
Go to the ODBC configuration in windows system
Conrol Panel -> Administrative Tools -> Data Sources (ODBC)

We start ODBC configuration

 

 

 

 

 

 

 

  

 

 

 

 

 

 

 

 

 

 

 

 

During configuration errors can occur - an error connecting to the server, check the database name or password or entered the correct port.

 

 

After the setup is complete, we can download the data to EXCEL

 

 

  1. We create a new Excel worksheet (Worksheet).
  2. Select the top menu Data (Data), choose External Data (Import External Data) and choose from other sources ServerNew SQL Database Query.

  3. Microsoft Query will start. First, you need to choose the data source, by selecting an existing Data Source Name.

    Microsoft Query, Choose Data Source
  4. Within the Query Wizard, choose the columns to import. The list of tables available to the user configured through the DSN is shown on the left, the columns that will be added to your query are shown on the right. The columns you choose are equivalent to those in the first section of a SELECT query. Click Next to continue.

    Microsoft Query, Choose Columns
  5. You can filter rows from the query (the equivalent of a WHERE clause) using the Filter Data dialog. Click Next to continue.

    Microsoft Query, Filter Data
  6. Select an (optional) sort order for the data. This is equivalent to using a ORDER BY clause in your SQL query. You can select up to three fields for sorting the information returned by the query. Click Next to continue.

    Microsoft Query, Sort Order
  7. Select the destination for your query. You can select to return the data Microsoft Excel, where you can choose a worksheet and cell where the data will be inserted; you can continue to view the query and results within Microsoft Query, where you can edit the SQL query and further filter and sort the information returned; or you can create an OLAP Cube from the query, which can then be used directly within Microsoft Excel. Click Finish.

    Microsoft Query, Selecting a destination

The same process can be used to import data into a Word document, where the data will be inserted as a table. This can be used for mail merge purposes (where the field data is read from a Word table), or where you want to include data and reports within a report or other document.

 

We create a new Excel worksheet (Worksheet).

Search