I would load the excel file into a
DataTable
object, and then add the records from the
DataTable
object into the database.
This CP article includes a class that imports Excel into a
DataTable
(and does a pretty good job of determining the correct column data types on the fly).
SQLXAgent - Jobs for SQL Express - Part 3 of 6[
^]
Be sure to *read the article* before using the code. It will help immensely.