SSIS help needing script task to get excel schema.

  • Hi guys,

    I need to create a package, which would load multiple excel files into an OLE DB destination. The header row for the excel columns can change from time to time due to error. The excel data is from an outside source. For this reason from my research, I believe it would best to create an excel schema from the source excel file, which load as an header when the package runs.

    I have search the net for examples, but what I have came across was either confusing, or not detailed enough for me to fully grasp the concept. The below link is somewhat in direction where I want to go, but I'm confused on the script task component portion and how to add the columns.

    http://www.mssqltips.com/sqlservertip/1674/retrieve-excel-schema-using-sql-integration-services-ssis/

    I really need to understand this, so any help is greatly appreciated.

  • That's because that article doesn't discuss how to change the schema/metadata for the source, only how to locate the target properly.

    You can't dynamically change metadata (ie, column info) at runtime with standard tools.

    Your choices are to build a script source that will read the file via VBA (I do not recommend this), or kick the file back to the senders when they error (I recommend this).


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply