A Simple Method to Load Excel Data


Problem

When we need to load data from Excel sheets to a SQL Server table, we typically use a data flow task. This task doesn’t have the flexibility that we often need and requires a strict orchestration of components to be able to work consistently. Transformations, derived columns, etc. are usually required. Mappings, sheet name, columns, and data types need to be static with little room for changes.

Solution

A simple C# script with a few read-only variables simplifies the load process and it makes it very easy to load a few columns or all columns, even a range of