I have written one application in ASP.Net (C#).
I want to read a excel file and insert all record from excel file to sql server table.
Say for example i have two column in excel file (student_id and student_name). I have 100 rows in this file. Now i want to read all record from this file and insert it into a table in sql server.
For inserting a record i want to write a stored procedure. Currently i am inserting record for executing for loop. so in this case, i am first reading file and populating data to data table variable. then for iterating through each record in table and calling stored procedure to insert that row.
is there any way where by i can send data table to sp as parameter and insert all record from datatable to database.