Loading a Data file into DB using Asp.net
-
I have a system which has an asp.net front end and a SQL Server DB. I get a file in the form of an excel spreadsheet every few weeks that contains a number of fields. I want to load it into the DB and the appropriate fields in the excel spreadsheet would go into the corresponding field in the DB tables. Anyone know how to do this?
-
I have a system which has an asp.net front end and a SQL Server DB. I get a file in the form of an excel spreadsheet every few weeks that contains a number of fields. I want to load it into the DB and the appropriate fields in the excel spreadsheet would go into the corresponding field in the DB tables. Anyone know how to do this?
Try one of the following libraries:
- ExcelDataReader[^];
- EPPlus[^];
- ClosedXML[^];
- The OpenXML SDK[^];
Avoid "office interop" at all costs:
Considerations for server-side Automation of Office[^]
Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
-
I have a system which has an asp.net front end and a SQL Server DB. I get a file in the form of an excel spreadsheet every few weeks that contains a number of fields. I want to load it into the DB and the appropriate fields in the excel spreadsheet would go into the corresponding field in the DB tables. Anyone know how to do this?