如何通过使用ASP.NET从Excel数据更新MySQL数据库? [英] How to update MYSQL Database with data from Excel using ASP.NET?

查看:257
本文介绍了如何通过使用ASP.NET从Excel数据更新MySQL数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有被通过一个自动化的过程每隔10秒更新的Excel文件。我需要Excel数据,其中位于远程服务器上的MY-SQL数据库进行更新。

I have an excel file which gets updated every 10 seconds through an automated process. I need excel data to be updated in MY-SQL database which is located on a remote server.

我该怎么办呢?

我也曾想过以下选项:
1)每11秒时,一个Excel宏将运行,并且将另存为创先争优为CSV文件。 (不知道这是否可以通过宏观完成......只是想)
2)本CSV文件,我们将FTP使用Windows服务远程服务器。
3)在远程服务器上,我们将解析CSV文件并更新MySQL数据库。

I have thought of following option: 1) Every 11 seconds, an Excel macro will run and will "Save as" excel as CSV file. (not sure whether this can be done by macro...just thinking) 2) This CSV file we will FTP to remote server using Windows Service. 3) On remote server, we will parse the csv file and Update MYSQL database.

这是方法好?或者你有更好的方法,需要更少的时间来更新数据库?

Is this approach fine? Or do you have a better approach which requires less time to update the database?

谢谢!

推荐答案

我发现下面的链接更加有用:

I found following links to be more useful:

http://www.heritage-tech.net/908/inserting-data-into-mysql-from-excel-using-vba/

http://vbaexcel.eu/vba-macro - code /更新MySQL的数据库,PHP

我希望这可以帮助有类似的问题,像我的人。

I hope this helps someone having similar problem as mine.

这篇关于如何通过使用ASP.NET从Excel数据更新MySQL数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆