Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Dynamic Excel sheet Read


Dynamic Excel sheet Read

Author
Message
SQL_Buddy99
SQL_Buddy99
SSC Rookie
SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)SSC Rookie (26 reputation)

Group: General Forum Members
Points: 26 Visits: 398
Hi guys,
I am new to SSIS. Thanks to SQLCentral it helped me in solving my daily assignments. I have a requirement I have like 10 files in a folder and many of the files have same number of column's but the excel sheet name is changing for few files many of the sheets have same name like sheet1 and some sheets have a different name so how can i dynamically load the data into same table and some sheets have extra column's which can be ignored. When i was trying to load the files with the extra columns it is giving an error saying Meta Data changed and package is failing can any of you guys help me in this.
higgim
higgim
Ten Centuries
Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)

Group: General Forum Members
Points: 1035 Visits: 2614
We had a similar problem where a CSV file we get supplied either has 275 or 256 columns.

To resolve this we read in the first line of the CSV file and take the length of that line. We then replace the delimiters with nothing and take another count of the length. The difference is the number of delimters. Depending on that we branch out to one of two import steps within the SSIS package.

Hope this helps / points you in right direction
Screen shot attached.
Attachments
SS1.jpg (6 views, 39.00 KB)
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