Friday, February 24, 2012

Export To Excel

Hi,

I'm trying to use the export to Excel (Excel Destination) however, I wish to supply a dynamic piece of SQL to generate the data.

When I set the properties I just get an option to enter "Table or View", "Table or View as Variable" or "SQL Command".

The issue is that the table does not exist until the SSIS job is run and the columns will not always be the same anyway.

How can I use a simple dynamic piece of SQL (or stored proc) to get a recordset that is simply dumped out to excel - rows... columns... nothing more ?.

Help very much appreciated - Paul.

I am afraid you cannot get a generic 'export to excel' utility using SSIS. The dataflow metadata can not be generated/changed dynamically at run time.

The closest thing you can get is to have a package per every source/destination; creating the excel sheet at run time is not a problem. The problem is creating the source destination mappings.

|||


Yeah... I was worried someone would say as much !

What on earth is wrong with sending a dataset of *unknown* columns in a tabular form to an Excel spreadsheet ?...

Why must everything be so complicated and convoluted ?... Its a SIMPLE export job....


Seriously - I give up...


Thanks for the reply

No comments:

Post a Comment