Microsoft Excel and Access can communicate with MySQL through MySQL Connector/ODBC. On Windows, you can configure an ODBC data source and use it from ODBC-aware Microsoft applications. The exact driver name depends on the Connector/ODBC version installed on the computer.
Download the current Connector/ODBC package from the official MySQL Connector/ODBC download page. After installation, open the Windows ODBC Data Source Administrator and create a User, System or File DSN as appropriate for your workflow.

Select the installed MySQL Unicode ODBC driver rather than relying on the historical MySQL ODBC 5.1 Driver name. Configure the server, user, password and target database, then test the connection.
Excel can use an ODBC data source to query MySQL and bring database rows into a worksheet. For an existing spreadsheet that must be moved into MySQL, common choices are to save the sheet as CSV and import it, or use Microsoft Access as an intermediary when that workflow is already in place.
The original Plus2net workflow uses Access as the transfer tool. Import or link the Excel worksheet in Access, make sure the first row is interpreted as field names where appropriate, and review data types before export.
In Access, use External Data and select the ODBC database option. Choose the MySQL DSN created above, authenticate, choose the destination database and provide the MySQL table name.
SHOW TABLES;
SELECT *
FROM imported_table
LIMIT 10;
Check column types, NULL handling, dates, decimal values and character encoding after import. Spreadsheet type inference does not replace a deliberate MySQL schema.
CSV data transfer · MySQL client and front-end tools · MySQL data types · Copy table data · Student SQL dump
Author & Instructor at plus2net
I write and maintain practical tutorials on Python, PHP, SQL, JavaScript, HTML, jQuery, and web development at plus2net. The tutorials focus on clear explanations, working examples, and code that readers can test and adapt while learning.
29-12-2020 | |
| Really good article well written | |