Friday, 21 June 2013

How to Import data from excel to SQL database using Asp.Net C#

 Here I will explain how to import data into database from excel work sheet using Asp.Net.

 In my earlier post we explain, how to export data from Gridview into different document formats like excel,
& pdf. For more details click here.

 There are lots of easiest ways available for import data from Excel to SQL server like
 1. Excel itself provide easy options
 2. SQL server has very easy Import/Export option
 3. SQL server has packing option
 There are lot of more methods of the same....For read more click here.

 Our requirement is to import data into SQL database from excel sheet using Asp.Net C#. For this, we use  
 OLEDB connection to read data from excel sheet in this post.
If we have excel in .xls format then we use 
and we have .xlsx format then use Microsoft.ACE.OLEDB.12.0.....

1 comment:

  1. Thanks for this article.

    Please also help me to resolve my one more query.
    "How to use ajax model popup extender in grid view for edit row values? "

    Thanks in Advance..!