Import Data from Excel to SQL Server
Next I am going to show how you could import data from your Excel Sheet to Your SQL Server Database on button click. You can modify your code accordingly based upon your requirement ie., You could upload your excel file using fileupload or you could associate new features to this technique.
Include these namespaces:
1>You have to change the configuration in your connection string according to your database..
2>Here i am using three fields namely Name,Marks1 and Marks2 in my excel file.. You could change your fields accordingly.
Then use the following code snippet: