Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 .NET Inside SQL Server (2005)
 Import Excel 2010 data to SQL Server table

Author  Topic 

dealwi8me
Starting Member

13 Posts

Posted - 2012-03-22 : 05:33:02
Hello all,

I have a problem with importing data from Excel 2010 in SQL Server.
What I want to do is to get a string that gives the path of an Excel Sheet 2010 file from the user through the .NET Application. Then I need to create a stored procedure that will append the data from excel file to an already created table in SQL Server. The table and the Excel Sheet will have the same columns with same names.

Any suggestions if there a way to build a stored procedure for this?

Thank you in advance.

sql-programmers
Posting Yak Master

190 Posts

Posted - 2012-05-04 : 08:24:06
see the link,

http://sqlteam.com/forums/topic.asp?TOPIC_ID=49926

SQL Server Programmers and Consultants
http://www.sql-programmers.com/

You can use bulk insert concept in .Net code.

see the link

http://www.dotnetfunda.com/Blogs/Hmanjarawala/1700/import-data-into-sql-server-from-excel-spreadsheet-using-sqlbulkcopy-class
Go to Top of Page
   

- Advertisement -