用于将Excel导入和导出到SQL Server的C#代码 [英] c# code for import and export excel to sql server

查看:84
本文介绍了用于将Excel导入和导出到SQL Server的C#代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用了您网站提供的代码
在链接上
Excel使用SQL批量复制到SQL Server [^]
用于将数据从excel导入到sql server
在其中有一个按钮,当我单击该按钮数据进入sql server时
如果我单击该按钮的次数比插入两次相同数据的次数大2倍
我希望以前的数据被新数据替换
而不是它的代码.

解决方案

不要将其发布在快速解答"下-如果您从某篇文章中获得了代码,则会有一个新消息"该文章底部的"按钮,这将导致向作者发送电子邮件.然后会通知他们您希望与他们交谈.
将其发布到这里依赖于他们的下落"并意识到它是为他们而设计的.
http://www.aspdotnet-suresh.com/2010/09/import-data-from-excel-to-sql-database.html [将数据导出到Excel [将MS Excel导入数据表 [ 解决方案

Don''t post this under Quick Answers - if you got the code from an article, then there is a "new message" button at the bottom of that article, which causes an email to be sent to the author. They are then alerted that you wish to speak to them.
Posting this here relies on them "dropping by" and realising it is for them.


hi ritu once look at this

http://www.aspdotnet-suresh.com/2010/09/import-data-from-excel-to-sql-database.html[^]


See
1.Exporting Data to Excel[^]
2.A discussion: import MS Excel to datatable[^]


这篇关于用于将Excel导入和导出到SQL Server的C#代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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