SSIS: Generic export from SQL server to Excel -
09-19-2006
, 02:41 AM
Hi,
I need to create a generic package in SSIS that can export data to an excel
file. I don't know in advance which table or which column to export, but I
can get this information from the database.
I have tried working with a script task and the package object. My idea was
to create a new package programmatically in the script task, add the data
flow task and source and destination objects, and programmatically set the
properties. Finally execute the package I created programmatically in the
script task. I can find basic examples on how to do this, but in the examples
the destination is a flat file or a oledb destination. I need help on how to
map columns between the source and the destination and set all the other
necessary properties on the excel destination. If someone could point me to
some example code or documentation on this, I'd be happy. Alternatively, if
someone has a better suggestion to the architecture of this solution, please
say so.
Thanks,
Dorte |