Import excel data into SQL server -- ASP.net and DTS -
09-11-2003
, 09:16 AM
Scenario:
1. User brings up ASP.net page.
2. User points to xls file to import.
3. User maps xls columns to database fields. (Some columns may be
omitted. I know which SQL Server table is the destination.)
4. User clicks button to start import.
5. Based on mapping, I dynamically create a Format File and use it to
import the data into SQL Server using a DTS package.
What I thought to be a simple solution has now had me thinking over it
for a few days now. I want to be able to import data from an excel
file that has no named ranges into a holding table from where it is
further inserted into the correct tables after checking for duplicates
etc.
Is this the best way to do it? |