ssis - Can we have the mapping for OleDB Source to Excel Destination at runtime rather than at design time? -
i trying create ssis bundle export csv info excel file. bundle called c# giving csv file input package. quite new ssis , i've been able produce expected result same headers.
i went next approach -
script task - created scripts csv headers create temp table, mass insert, excel table scripts. execute sql task - created temp table in database execute sql task - mass insert csv info table execute sql task - create excel file data flow task - oledb source excel destination execute sql task - drop temp table createdthe challenge facing csv may have different headers (both text , number of headers may different). , want single bundle serve purpose.
with headers beingness different, mapping between oledb souce excel destination in step 5 above not working dynamic headers , giving unexpected results in excel output. there way these mappings can decided @ runtime , not @ design time.
i don't believe can specify columns or column mappings of info flow @ ssis runtime. build ssis bundle on-the-fly, allow c# code create column mappings, mappings have created before bundle can run. see building packages programmatically in msdn details.
on other hand, if you're trying convert csv file excel spreadsheet, seem logical me utilize workbook.saveas method of office object model.
ssis
No comments:
Post a Comment