aspdotnet-suresh offers articles and tutorials,csharp dot net, articles and tutorials,VB.NET Articles,Gridview articles,code examples of 2.0 /3.5,AJAX,SQL Server Articles,examples of .net technologies

C#- Import/Upload Data from Excel to SQL Server 2008 in using C#, VB.Net.

Dec 18, 2012

Here I will explain how to upload or import data from excel to SQL Server using in c#,
In previous article I explained Import Excel data to gridview in,
How to Export gridview data to excel/word document, Import Excel data to sql database and some other articles relating to export gridview data. Now I will explain how to upload or import data from excel to SQL Server using in c#,
To implement this concept check below posts here I explained two ways to insert data into database

If you enjoyed this post, please support the blog below. It's FREE!

Get the latest,, VB.NET, jQuery, Plugins & Code Snippets for FREE by subscribing to our Facebook, Twitter, RSS feed, or by email.

subscribe by rss Subscribe by RSS subscribe by email Subscribe by Email


Anonymous said...


Unknown said...

Hello Sir,

Please give idea for Excel sheet to SQl server insetion using the C#.

Unknown said...

but how to import excel data row by row to database checking blank row

Prhemnath Raju said...

Mr. suresh , when i apply this code locally its is executed but when i try to do it over internet it's not working, should i add any reference file to so that i can upload it over internet?

Unknown said...

Hello sir,
when i am trying to import data from excel to DB,it shows Violation of primary key Constraint.
how can i add data in to table using exception.
Can you help me to solve this problem.

Unknown said...

Dear sir,
Please provide me an idea to save excel data to the sql server 2005.

Unknown said...
This comment has been removed by a blog administrator.
Anurag Maurya said...

How do i upload csv file which is more than 2 GB.

When i uploaded i got error : Exception of type 'System.OutOfMemoryException' was thrown.

Unknown said...

Dear Sir
I am upload Excel file in db using wpf mvvm methods. how i can upload pls help me

Anonymous said...

Dear Sir,

I am uploading multiple excel sheets into multiple tables in sql server...How can i write the code using help me

ds said...


Give your Valuable Comments

Note: Only a member of this blog may post a comment.

© 2015 All Rights Reserved.
The content is copyrighted to Suresh Dasari and may not be reproduced on other websites without permission from the owner.