question

arajmsbi avatar image
arajmsbi asked

how to read/validate a excel file and stored into the sql server database through script component in ssis 2012?

i have excel file source, i want to read/validate the file with ssis script task 2012then store into the sql DB. can anyone share step 2 step process so that i can do this.
sql-server-2012script-task
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Fatherjack avatar image Fatherjack ♦♦ commented ·
where have you looked already, what part of the process are you having problems with?
1 Like 1 ·

1 Answer

·
Tom Staab avatar image
Tom Staab answered
You could create a dataflow with a script task in the middle. Read the data from the spreadsheet, evaluate in the script, and then store in the destination. Alternatively, you could load all of the data into the database and then validate. In most cases, you can dump the sheet into a table of large varchar fields. Then you can process, validate, etc. from there and copy the good data to another table via dataflow task. We have found that to be easier in some cases because we are more familiar with querying and validating table data rather than spreadsheet data.
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.