MS Excel 2003 可以用来 //编辑// MySQL 数据库吗?

发布于 2024-08-16 14:56:38 字数 416 浏览 9 评论 0原文

有谁知道如何让 Excel 2003 将更改推送到 MySQL 数据库?

目前,我们正在使用 Excel 2003 来跟踪一大堆互连设备(实际上,是一个完整的配电系统,上面挂着所有的胡言乱语。) 坦率地说,使用电子表格来完成此任务很糟糕,我我厌倦了它,所以我想将它转换为真正的数据库,如 MySQL。

问题是:

  • 使用它的人不太精通计算机。使用 Excel 编辑 MySQL 数据库使他们免去了学习新东西的痛苦。
  • 我们没有 MS Access 许可证,否则我会使用它。
  • 我没有时间推出自己的自定义应用程序。

我已经获取并安装了 MySQL ODBC 驱动程序,将数据从 MySQL 导入到 Excel 是一件轻而易举的事情;但没有明显的方法可以逆转,将 Excel 中的更改推送回 MySQL。

Does anyone know of a way to make Excel 2003 push changes to a MySQL database?

Currently, we're using Excel 2003 for keeping track of a big bunch of interconnected equipment (actually, an entire electric power distribution system with all the hoo-ha's that hang off it.) Quite frankly, using a spreadsheet for this sucks and I'm sick of it, so I want to convert it over to a Real Database like MySQL.

The gotchas are:

  • The people who are using it aren't overly computer savvy. Using Excel to edit the MySQL database saves them the pain of learning something new.
  • We don't have a license for MS Access, or I'd use that instead.
  • I don't have the time to roll my own custom app.

I've already grabbed the MySQL ODBC driver and installed it, and importing data from MySQL to Excel is a breeze; but there's no obvious way to to the reverse, and push changes in Excel back to MySQL.

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

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

发布评论

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

评论(2

泅渡 2024-08-23 14:56:38

这里(至少)有两种可能的方法。

使用 MySQL 数据库,并按照您的建议使用 ODBC 驱动程序来更新数据库。使用 ActiveX 数据对象 (ADO) 可以让您完成此任务。有关详细信息,请参阅此处

或者,您可以创建 Microsoft JET 数据库并使用它代替 MySQL。这可以使用 ADOX 创建数据库来完成 - 请参阅 这里 - 然后使用 ADO 来更新它。

ADO 和 ADOX 在我的标准 Office 2003 安装(不包括 Access)中都可用,因此希望您的系统也有它们。

作为后备方案,如果这些不可用,您可以查看数据访问对象 (DAO)——ADO 的前身——但 ADO 对我来说似乎更容易使用。 DAO 详细信息位于此处

There are (at least) two possible approaches here.

Use a MySQL database and, as you suggested, use the ODBC driver to update the database. Using ActiveX Data Objects (ADO) can let you accomplish this. See here for details

Alternatively, you can create a Microsoft JET database and use that instead of MySQL. This can be done using ADOX to create the database - see here - and then ADO to update it.

Both ADO and ADOX are available on my standard Office 2003 install (which does not include Access) so hopefully your system will have them too.

As a fallback if these aren't available, you could look at Data Access Objects (DAO) - the predecessor to ADO - but ADO seems a lot easier to use to me. DAO details are here

绝影如岚 2024-08-23 14:56:38

@Roland Bourman 的评论(这本身就应该是一个答案)是一个非常有趣的方法。如果您不是 VB 专家,您甚至可以在脚本级别上执行 Excel 外部的拉/推操作,在打开 Excel 之前将数据从 mySQL 拉入 Excel 工作表(简单),并在关闭 Excel 后将其写回。这可以使用多种工具来完成。

@Roland Bourman's comment (which would deserve to be an answer in itself) is a very interesting approach. If you're not a VB expert, you could mabye even do the pull/push outside of Excel on script level, pulling the data from mySQL into an excel sheet before opening Excel (easy) and writing it back after closing it. This could be done using a variety of tools.

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