Home » Software Guides » Office Suites » MS Office 2010 » Connecting Excel 2007 & 2010 to MySQL using ODBC

Browse Guides & How-to's

Connecting Excel 2007 & 2010 to MySQL using ODBC

Published: Andreas Wiebe, 08 July 2010 - 21:59

Connecting Excel 2007 & 2010 to MySQL using ODBC

It is possible to use pivot tables with a MySQL table to get a better view of your data. Note that you can only connect to one MySQL table for each Excel table or pivot table you want, if you require information from several tables you’ll need to create a joined table in MySQL and connect to that.

  1. Download and install the MySQL ODBC driver
    1. You can obtain the MySQL ODBC driver here: http://dev.mysql.com/downloads/connector/odbc/5.1.html
    2. Once downloaded, install by double-clicking the file and following the prompts
  2. Create an ODBC connection to the MySQL database
  3. Add the ODBC Data connection in Excel 2007 & 2010
    1. Open Excel
    2. Click Data in the Ribbon
      Microsoft Excel Data Ribbon
    3. Click From other Sources and select From Data connection Wizard in the drop-down
      Microsoft Excel Data Connection Wizard Ribbon
    4. Select Other/Advanced in the Data Connection wizard and click next
      Microsoft Excel Data Connection Wizard
    5. In the Provider tab select "Microsoft OLE DB Provider for ODBC Drivers" and click Next
      Microsoft Excel Data Link Properties Dialog provider tab
    6. In the Connection tab, select your datasource name and click ok
      Microsoft Excel Data Link Properties dialog connection tab
    7. Select the database and table you want to pivot, then click Next
      Microsoft Excel Data Connection Wizard Dialog database and table selection
    8. Click Finish to save the connection with the default filename
      Microsoft Excel Data Connection Wizard Dialog
    9. In the import Data dialog, select pivot table report and click ok
      Microsoft Excel Import Data Dialog
    10. Your MySQL table will now be available to you in Excel