1.) If you have knowledge of SSIS package in sql server, then this is highly recommended approach. 2.) You can read excel file in c# and place the data in dataset with multiple tables corresponding to multiple sheets and use sqlBulkInsert.Thanks! Anjali Bansal
You can use Spire.XLS (https://www.nuget.org/packages/Spire.XLS/) to easily export the data of each worksheet to a datatable, the code is straightforward as following:
Workbook workbook = new Workbook(); workbook.LoadFromFile(@"Input.xlsx"); Worksheet sheet = workbook.Worksheets[0]; //Export the data of the first worksheet to a datatable DataTable dt = sheet.ExportDataTable();
After that you can add the datatables to a dataset and then use SqlBulkCopy to quickly insert dataset records to database.