# Loading MySQL tables from Excel

**URL:** <https://forum.inductiveautomation.com/t/loading-mysql-tables-from-excel/259>\
**Category:** Archived Topics\
**Created:** [April 20, 2007, 1:06pm UTC](https://forum.inductiveautomation.com/t/loading-mysql-tables-from-excel/259 "2007-04-20T13:06:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![DB2](https://avatars.discourse-cdn.com/v4/letter/d/e0b2c6/32.png) [@DB2](https://forum.inductiveautomation.com/u/DB2)\
**Post date:** [April 20, 2007, 1:06pm UTC](https://forum.inductiveautomation.com/t/loading-mysql-tables-from-excel/259/1 "2007-04-20T13:06:58Z")

</div>

Is it possible to load and update MySQL tables from Excel, and if so how? I havn’t been able to find any source code.

---

<div class="post-metadata">

**Author:** ![nathan](https://avatars.discourse-cdn.com/v4/letter/n/c5a1d2/32.png) [@nathan](https://forum.inductiveautomation.com/u/nathan)\
**Post date:** [April 20, 2007, 2:49pm UTC](https://forum.inductiveautomation.com/t/loading-mysql-tables-from-excel/259/2 "2007-04-20T14:49:12Z")

</div>

Excel supports External Data Sources. In this case you set up a system ODBC driver and can access it in Excel.

Here’s a step by step instruction  
[dev.mysql.com/doc/refman/5.1/en/ … excel.html](http://dev.mysql.com/doc/refman/5.1/en/myodbc-examples-tools-with-wordexcel.html)

While we’re at it, [here’s](http://dev.mysql.com/doc/refman/5.1/en/myodbc-examples-tools-with-access.html) how it would be done with MS Access

---

<div class="post-metadata">

**Author:** ![DB2](https://avatars.discourse-cdn.com/v4/letter/d/e0b2c6/32.png) [@DB2](https://forum.inductiveautomation.com/u/DB2)\
**Post date:** [April 21, 2007, 12:02am UTC](https://forum.inductiveautomation.com/t/loading-mysql-tables-from-excel/259/3 "2007-04-21T00:02:27Z")

</div>

Will this work in both directions? I need to send data rom Excel to MySQl.

---

<div class="post-metadata">

**Author:** ![nathan](https://avatars.discourse-cdn.com/v4/letter/n/c5a1d2/32.png) [@nathan](https://forum.inductiveautomation.com/u/nathan)\
**Post date:** [April 23, 2007, 10:16pm UTC](https://forum.inductiveautomation.com/t/loading-mysql-tables-from-excel/259/4 "2007-04-23T22:16:51Z")

</div>

Excel has the Microsoft Query window that can be accessed via the External Data toolbar. It can be set to allow the user to edit data under “Records”-\>“Allow Editing”. I don’t think that there’s an easy way to “tie” data between Excel and an SQL database bi-directionally (MS SQL Server or MySQL). You can use VBA scripting within Excel to accomplish this functionality, but this probably isn’t what you had in mind.

I think what may be relevant for you is to use MS Access as a Frontend to MySQL. This is done via Linked Tables, which is described [here](http://dev.mysql.com/doc/refman/5.1/en/myodbc-examples-tools-with-access.html#myodbc-examples-tools-with-access-linked-tables).
