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
SSCommitted
SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)

Group: General Forum Members
Points: 1870 Visits: 838
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
SSCarpal Tunnel
SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)

Group: General Forum Members
Points: 4123 Visits: 2731
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
SSCommitted
SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)

Group: General Forum Members
Points: 1870 Visits: 838
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
SSCrazy
SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)

Group: General Forum Members
Points: 2070 Visits: 2536
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