SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


ssis excel source connection question


ssis excel source connection question

Author
Message
Snargables
Snargables
Right there with Babe
Right there with Babe (741 reputation)Right there with Babe (741 reputation)Right there with Babe (741 reputation)Right there with Babe (741 reputation)Right there with Babe (741 reputation)Right there with Babe (741 reputation)Right there with Babe (741 reputation)Right there with Babe (741 reputation)

Group: General Forum Members
Points: 741 Visits: 805
in ssis. I need to loop through n number of excel files from a folder. The problem is that each files first tab has a different name. is there a way to specify the first tab as an integer in the connection? for example in the connection tell t to use sheet(0) or something lioke that
PB_BI
PB_BI
SSCommitted
SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)

Group: General Forum Members
Points: 1968 Visits: 2518
I think you'd have to do this in a script task and then pass the value into a variable to use later on in a data flow task excel source.

You can get the name of the first sheet in a workbook each time, have a read of this and it should help you.

Best of luck :-)




I'm on LinkedIn
Snargables
Snargables
Right there with Babe
Right there with Babe (741 reputation)Right there with Babe (741 reputation)Right there with Babe (741 reputation)Right there with Babe (741 reputation)Right there with Babe (741 reputation)Right there with Babe (741 reputation)Right there with Babe (741 reputation)Right there with Babe (741 reputation)

Group: General Forum Members
Points: 741 Visits: 805
to close the loop.

I've been having several issues w/ SSIS. specifically w/ it's file consumption. In this instance u have to access the tab name as opposed to some sort of tab array. Ideally it should allow for tab(0) type thing. Nonetheless, I'm starting to learn that there are several other etl tools that don't seem to have the same issue's I’m running into w/ SSIS.

As far as this specific issue. I ended up writing a C# console app to step through all folders and files and consume all excel spreadsheets into db table. For whatever reason I don’t appear to have the same sorts of missing column issues due to data inconsistencies as I do in ssis.
sqldriver
sqldriver
SSC Eights!
SSC Eights! (974 reputation)SSC Eights! (974 reputation)SSC Eights! (974 reputation)SSC Eights! (974 reputation)SSC Eights! (974 reputation)SSC Eights! (974 reputation)SSC Eights! (974 reputation)SSC Eights! (974 reputation)

Group: General Forum Members
Points: 974 Visits: 2518
Another option might be to have PowerShell output the contents of your Excel files as .CSV files before processing. If I recall correctly, you don't need to name the 'tab' of a CSV in connection strings.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search