使用C#将数据从Excel工作表导入SQL Server数据库 [英] Import Data from Excel sheet to SQL server database using C#

查看:375
本文介绍了使用C#将数据从Excel工作表导入SQL Server数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我使用此用户在我的网页中有一个文件上传控件,将上传与数据库表格式相同的excel文件containsig数据.

我需要从excel工作表中获取文件并导入数据,并且应该将其插入到SQL Server数据库中的表中.

在这种情况下,请提供任何帮助.

Hi,
i''ve a file upload control in my web page using this user will upload the excel file containig data which is same format as the table in database.

I need to get the file and import data from the excel sheet and should insert to the table in SQL server database.

Please can any one help in this context.

推荐答案

尝试通过
将数据从Excel导入到SQL Server [ http://csharpdotnetfreak.blogspot.com/2009/04/export-excel- data-sqlbulkcopy-aspnet.html [ ^ ]
如何使用c#.net [
Try going through
Import Data from Excel to SQL Server[^]
http://csharpdotnetfreak.blogspot.com/2009/04/export-excel-data-sqlbulkcopy-aspnet.html[^]
How to import MS Excel data to SQL Server table using c#.net[^]

I''m sure you will get an idea of what you need to do once you go through these links.


这篇关于使用C#将数据从Excel工作表导入SQL Server数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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