0

I am trying to load an excel file with unknown file name (system generated) and unknown worksheet (system generated) into SQL Server 2012 using a SQL Server 2012 SSIS package.

The staging folder will remain constant. Only 1 file will be generated and staged weekly. The file will only contain 1 worksheet.

The core SSIS package is pretty straight forward:

Control Flow: SQL Command to truncate the staging table > Data flow task.

Data Flow: Excel source > Data conversion > Destination

I tried using this walk though ( Loop through Excel files and load them into a database using ssis ) but was unable to get it to work correctly once I started testing it by renaming the excel file and changing the worksheet name.

Any help would be appreciated.

Community
  • 1
  • 1
wjm
  • 17
  • 4
  • 1
    Can you use the excel interop on this machine? – Eric Hauenstein Feb 11 '15 at 14:20
  • Eric, I don't know what that is. I am fairly new to the SSIS world. I was hoping to avoid the need to human interaction. – wjm Feb 15 '15 at 16:54
  • Excel interop let's you smoothly interact with excel documents directly from C# or VB. Using it, you would get a list of the excel sheet names and data ranges to import, and set them to SSIS variables. If there's only one sheet, you may be able to just use more generic .net code. – Eric Hauenstein Feb 15 '15 at 18:24

0 Answers0