Search code examples
mysqlexcelmysql-workbenchautomatic-updates

Excel and Workbench Link. MySql how to automatically update values


Does anyone here know how to do the following:

I have data inside an Sql database (MySQl, workbench). I can export it into an excel sheet. Then I can simply save it on my desktop. Pretty straight forward.

But my question is: How do I have an automatic link between the two? Lets say... I have added a new line inside an excel sheet and vice versa. how would the two communicate together and send relevant data to mirror each others data?


Solution

  • Few possible options in your case:

    1. Try creating a view of the desired table in MySQL workbench which will hold the updated records, every time you make changes to table or rows in MySQL Table. (instead of adding new rows in excel, add rows in MySQL table and the view will update automatically).

    Then export the view in excel or csv format.

    1. You can install Excel plugin "MySQL for excel" which will allow you to add/update data in your SQL table through excel spreadsheet.

    (In case, if you wish to connect two tables in MySQL server, try using foreign keys and triggers. With the help of triggers/foreign keys, the child table can be updated based on the new values in parent table and vice versa. )