Click here to Skip to main content
15,888,113 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi guys!

I working on a school project and i need one help.
I tried searching on the net and is not helping me much, so far i only get to import the excel (.xlsx) file in my visual studio and display in gridview.
but i want to programme it such that the user select the excel file he/she want to insert and this excel file data would all appear in my SQL Server Management Studio.
Can anyone help me with this?
Thanks!!
Posted

1 solution

Hi there,
This link sounds useful. It will use OleDbConnection to connect to the Excel file then loads it in a DataTable and then sends it to the SqlServer.

Import Data from excel to SQL server using C# in ASP. NET[^]

You can find more posts associated with importing Excel to SQL using C# in CodeProject

I hope it helps,
Cheers.
 
Share this answer
 
Comments
xbolslock 4-Apr-12 23:00pm    
Hi thanks. but still dont understand, got an error in the link you gave me. thanks anyway.
will look for more posts.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900