HI
I have excel file (.xls), i want read data from excel file and save into sql server database table in c# console.
| EmpId | FirstName | LastName | Desc | Remark |
| 101 | A | B | 101 - A | AA |
HI
I have excel file (.xls), i want read data from excel file and save into sql server database table in c# console.
| EmpId | FirstName | LastName | Desc | Remark |
| 101 | A | B | 101 - A | AA |
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Leon DPosted Dec 27, 2022, 1:29 AM
You can refer to the below article to read data from Excel to a datatable, then insert the datatable into the database.
https://www.e-iceblue.com/Tutorials/Spire.XLS/Spire.XLS-Program-Guide/Excel-Import/Export-Import-Data-from-Excel-to-Datatable.html
Vishal YelvePosted Dec 26, 2022, 5:58 PM
Please refer my below article, how to read data from excel file.
https://www.c-sharpcorner.com/article/how-to-read-data-from-an-excel-sheet/
Vishal JoshiPosted Dec 26, 2022, 9:19 AM
Hello
Please check the below article for the same.
https://www.c-sharpcorner.com/blogs/import-excel-spreadsheet-data-into-sql-server-table-using-c-sharp
Thanks
Amit MohantyPosted Dec 26, 2022, 6:46 AM
Try this