Search code examples
ssissql-server-2012import-from-excel

SSIS import Excel files to staging table then exceute stored procedure


I have been trying to work out how to do the following and as a newbie to ssis I'm getting a a bit lost. I need to:

  1. Load 'n' number of Excel files with different name but all have the same format
  2. load each file into a SQL Server 2012 staging table
  3. execute a stored procedure to work on the data in the staging table and load into the final table

I am able to setup an Excel source and import the data to staging, using Excel source, and an OleDb destination.

So my questions are:

  1. how to I load multiple Excel files with different names?
  2. how do I execute the stored procedure (which I have already written) after loading all the Excel files into staging?

Help much appreciated

Thanks


Solution

  • See the duplicate question for the answer to 1.

    For the answer to 2., after the loop that loads the files, use an Execute SQL Task to call your stored procedure.