如何将excel文件作为表导入mysql?

发布于 2025-01-17 10:20:01 字数 100 浏览 4 评论 0原文

如何将Excel文件作为MySQL的表导入?我想自动化它。当我的Excel文件中的单元格更改时,我希望我的表自动更改。即使Excel文件被一个名称相同的文件替换,我也希望我的表自动更换。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

[旋木] 2025-01-24 10:20:01

您可以创建一个每分钟运行一次并检查 Excel 文件的 nodeJS 脚本。也许找到一种机制来检查文件是否已更改,或者只是每分钟用 excel 文件的内容覆盖 sql 表。

  • 每分钟运行nodeJS-Script:npm node-schedule或Windows/ios操作系统script-trigger
  • 读取excel文件:npm xlsx
  • 写入sql-table:npm Sequelize

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
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文