How can i import an excel file as a table to MySQL? I would like to automate it. When a cell in my excel file changes, i want my table to change automatically. Even if the excel file is replaced by one with the same name, i want my table to get replaced automatically.
Asked
Active
Viewed 386 times
0
-
Does this answer your question? [How to import an excel file in to a MySQL database](https://stackoverflow.com/questions/1310166/how-to-import-an-excel-file-in-to-a-mysql-database) – Ashok Mar 28 '22 at 18:24
1 Answers
0
You could create a nodeJS-Script that runs every minute and checks the excel file. Maybe find a mechanism to check if the file has changed or just simply overwrite the sql-table with contents of excel-file every minute.
- run nodeJS-Script every minute: npm node-schedule or Windows/ios operation system script-trigger
- read excel file: npm xlsx
- write sql-table: npm sequelize

Fabius
- 23
- 2
-
There's also some built-in and 3rd party file watching tools in the node-world, see https://stackoverflow.com/questions/7317909/filesystem-watcher-using-node-js/7318487 – mweber Mar 29 '22 at 06:59