Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Vishal YelveRank #178 · 13.6K reputationPosted Sep 9, 2022, 7:55 AM EDT
Jignesh KumarRank #91 · 22.9K reputationPosted Sep 9, 2022, 8:04 AM EDT
Rajanikant HawaldarRank #110 · 20.2K reputationPosted Sep 9, 2022, 9:49 AM EDT
Leon DRank #851 · 2.6K reputationPosted Sep 12, 2022, 8:53 PM EDT
You can read data in Excel worksheet to a datatable with ease using free spire.xls library (https://www.nuget.org/packages/FreeSpire.XLS), then save the datatable to database.
Workbook workbook = new Workbook(); workbook.LoadFromFile(@"F:\Data.xlsx" , ExcelVersion.Version2013); Worksheet sheet = workbook.Worksheets[0]; DataTable dt = sheet.ExportDataTable();For more information, visit this link:
https://www.e-iceblue.com/Tutorials/Spire.XLS/Spire.XLS-Program-Guide/Excel-Import/Export-Import-Data-from-Excel-to-Datatable.html
Uday DodiyaRank #239 · 10.3K reputationPosted Sep 13, 2022, 12:36 AM EDT
Hi Smitha,
Check the following article
https://docs.microsoft.com/en-us/sql/relational-databases/import-export/import-data-from-excel-to-sql?view=sql-server-ver16
https://www.sqlshack.com/import-data-excel-file-sql-server-database/
https://www.youtube.com/watch?v=JVP9frj2VSQ