I have an excel table which I imported into mysql, however the excel file will be updated regularly with fields changing values and rows being added. Now what is the easiest way to keep the mysql database up to date? I tried linking with ms access but it only adds the table as new lines. How can I update? thanks!
Hi! There's no way to do this without manual coding. MS Excel does not have unique indexes, so it's hard to find what has been changed. But if you know some usefull particularity of the data (e.g. first column is incremented unique ID), you can write a simple program in your favorite language that looks for changes the XLS file and write them into MySQL using ODBC connection. Hope, this will help
PHPMyAdmin will not help you. You need a script to handle the Excel file. If you know how to code yourself, this is what you should do every time you deal with the updated version: 1. Read every row from the Excel file 2. Check to see if the row is new or existing in the MySQL database. To be able to do this properly you will need to find at least one constant field in the Excel file. If there isn't one you should consider adding one. 3. Add / update database accordingly You could add some value sanity checks also if you wish. Also consider the suggestion to not use Excel at all if you don't really have any use for it.