如何使用C#通过ASP.NET将Excel数据保存到SQL Server

问题描述:

先生

iam使用sql server 2008和asp.net4.0


在sql server iam中具有带有列的表employee

sir

iam using sql server 2008 and asp.net4.0


in sql server iam having table employee with columns

empid          int
empname        varchar(50)
designation    varchar(50)
salary         money



iam在Excel工作表中具有相同的列(empidempnamedesignationsalary).

在asp.net中,iam通过fileupload控制获取此excel工作表,而当我单击iam时,iam已保存了buuton,它必须存储在sql server中


请您帮帮我吗



iam having same columns in excel sheet(empid, empname, designation, salary).

in asp.net iam getting this excel sheet through fileupload control and iam having save buuton when i clicks on its it has to store in sql server


please can you help me

检查以下内容:

http://support.microsoft.com/kb/321686 [将数据从Excel或使用TSQL脚本从Access导入到SQL Server [ http://csharpdotnetfreak.blogspot.com/2009/04/export-excel- data-sqlbulkcopy-aspnet.html [ ^ ]

http://forums.asp.net/t/1336761.aspx/1 [ ^ ]

希望对您有所帮助:)
check these out:

http://support.microsoft.com/kb/321686[^]

Import Data to SQL Server from Excel or Access using TSQL Script[^]

http://csharpdotnetfreak.blogspot.com/2009/04/export-excel-data-sqlbulkcopy-aspnet.html[^]

http://forums.asp.net/t/1336761.aspx/1[^]

hope it helps :)


尝试本CP文章
Excel To Sql
try this CP Article
Excel To Sql