asp.net使用窗口服务上传excel并进行验证 [英] asp.net uploading excel with validation using window service

查看:65
本文介绍了asp.net使用窗口服务上传excel并进行验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,





我有一个问题,我们如何将excel文件上传到c#中的web服务器。

之后,我们制作将excel数据复制到表sql数据库的窗口服务,在传递验证后将excel数据复制到sql表,如果该字段中存在任何现有数据,则无法复制数据(重复数据) 。这个Windows服务将每隔一分钟运行一次。 。



如何制作这段代码?

请帮帮我,



非常感谢

hello all,


I have a question, how we could upload excel file to web server in c#.
After that, we make window service that copy excel data into table sql database, the excel data were copied to sql table after pass validation such as data cannot copied if there is any existing data in that field (duplicate data). and this windows service will run every one minute. .

how I can make this code?
please help me,

thank you very much

推荐答案

推荐这个



http://msdn.microsoft.com/en-us/library/aa479405.aspx [ ^ ]



在Windows服务中使用FileSystemWatcher并编写逻辑来读取excel文件并将行转储到数据库中。



http://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher.aspx [ ^ ]



PS:代码不是免费的。一个人必须学习如何编码:)
Refer this

http://msdn.microsoft.com/en-us/library/aa479405.aspx[^]

Use FileSystemWatcher in your Windows Service and write logic to read excel file and dump rows into database.

http://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher.aspx[^]

PS: Code is not free. One has to learn how to code :)


这篇关于asp.net使用窗口服务上传excel并进行验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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