简体   繁体   English

是否可以将 Excel 与 MySQL 数据库连接起来

[英]Is it possible to connect an Excel with a MySQL Database

I am currently working on an Excel where data is entered, that should end up in a database.我目前正在研究输入数据的 Excel,它最终应该在数据库中。 I already wrote a code to validate the entered data, now I am looking for a way to connect the excel-sheet directly with the database.我已经编写了一个代码来验证输入的数据,现在我正在寻找一种将 excel-sheet 直接与数据库连接的方法。

One more simple way is to save the data as CSV and then read it in by Python code.一种更简单的方法是将数据保存为 CSV,然后通过 Python 代码读取。 But is there a way to import the data directly from excel to the database?但是有没有办法直接将excel中的数据导入数据库呢?

Is it possible to connect it by Excel VBA or python?是否可以通过 Excel VBA 或 python 连接它? Do you have any other ideas?你还有其他建议吗?

Thank you for your ideas/ help!感谢您的想法/帮助!

Wouldn't you be able to achieve this by setting up a rest API that actually does the crud option on your database and just hit the API from your excel using a vba script. Wouldn't you be able to achieve this by setting up a rest API that actually does the crud option on your database and just hit the API from your excel using a vba script.

This answer could provide reference to how the API can be hit from the Excel file and as for the restAPI that you use to complete the CRUD operations, you could possibly set up a simple django backend.此答案可以提供有关如何从 Excel 文件中命中 API 的参考,对于用于完成 CRUD 操作的 restAPI,您可以设置一个简单的 django 后端。 This is pure theory since I have never used VBA but with the above references it should be possible这是纯理论,因为我从未使用过 VBA 但通过上述参考资料应该是可能的

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM