all groups > sql server dts > april 2007 >
You're in the

sql server dts

group:

Export to Excel with Custom Properties


Export to Excel with Custom Properties Red
4/5/2007 6:00:33 AM
sql server dts:
Hi,

We have lots of DTS packages that output to Excel files. We would
like to add custom properties to the Excel files, such as the (DTS)
source of the file, DTS package version, Any global variables etc.
This would help us to identify the source of a file that has
circulated around the company a few times, been changed etc.

Can properties of Excel workbooks be set in ActiveX?

Many TIA,


Red.
Re: Export to Excel with Custom Properties Allan Mitchell
4/9/2007 12:00:00 AM
Hello Red,

Not really sure I get this but here is what I think

You want to add to the export from file X a number of new columns and they
will contain things like Filename and Global Variable X

Yes you can do this. In your Mappings page in the Transform Data task you
highlight the destination columns only and then create a new Active Script
transform. You then set the values of theose destination columns to the
global variables (You can also retrieve the connection properties here as
well)

Have I got this the right way round?

--

Allan Mitchell
http://wiki.sqlis.com | http://www.sqlis.com | http://www.sqldts.com |
http://www.konesans.com

[quoted text, click to view]

Re: Export to Excel with Custom Properties Red
4/10/2007 3:10:21 AM
[quoted text, click to view]

Not quite. Open up an excel workbook, File > Properties > Custom.
You can add custom properties for the workbook. This is what I want
to add.

I can add data to the sheets themselves, which I sometimes do.
However, users often delete columns and sheets that don't interest
them. Properties would suite my needs a little better.

Thanks,

Red.

Re: Export to Excel with Custom Properties Red
4/10/2007 3:47:10 PM
[quoted text, click to view]

OK, thanks Alan. Back to google I guess!

Red.
Re: Export to Excel with Custom Properties Allan Mitchell
4/10/2007 8:20:47 PM
Hello Red,

OK you will have to open up the Spreadsheet programmatically and insert those
property values.

--

Allan Mitchell
http://wiki.sqlis.com | http://www.sqlis.com | http://www.sqldts.com |
http://www.konesans.com

[quoted text, click to view]

AddThis Social Bookmark Button