dbTalk Databases Forums  

Exporting to Excel using SSIS

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Exporting to Excel using SSIS in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Robert Chapman
 
Posts: n/a

Default Exporting to Excel using SSIS - 11-01-2006 , 04:41 AM







Hi, I'm interested in best practices for exporting data to files whose names
aren't known at design time. What's the best way to export a file to Excel
and still have control over the column mappings?

Previously for flat file exports I have used a property expression on the
ConnectionString property which works but you end up mapping all variables to
one overall field (as there is no place to define the structure of the
destination file). This technique (using the ExcelFilePath property) doesn't
work for Excel and even if it did you would need to have control over the
fields/columns?

My current solution is to maintain an Excel template which has a single row
with column headings, then use a FileSystemTask to copy this template to the
new file name, which then can be mapped. This seems to work but I'm not sure
it's the best way to do it. Also I can't seem to maintain any control over
the column formatting: all my numerical values come through as text even
though I have converted the data types. There must be some way to avoid
having to open up all the Excel files and change their formatting??

TIA,

Rob

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.