SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SSIS -> Excel Formatting Issue


SSIS -> Excel Formatting Issue

Author
Message
Jako de Wet
Jako de Wet
Say Hey Kid
Say Hey Kid (709 reputation)Say Hey Kid (709 reputation)Say Hey Kid (709 reputation)Say Hey Kid (709 reputation)Say Hey Kid (709 reputation)Say Hey Kid (709 reputation)Say Hey Kid (709 reputation)Say Hey Kid (709 reputation)

Group: General Forum Members
Points: 709 Visits: 215
Hi everyone

What is the best way to keep the formatting in Excel? I have created a template with the font, column types, graphs, sums etc and removed all the data.

When I export the data into the columns, the formatting is gone, font size is different and the SUM/Graphs does't auto update as I thought it would have.

Is there any easy way around this?

Most of the posts Ive read about this, talks about using a Script Task to do further formatting?

Thanks
nick.ryan 5248
nick.ryan 5248
SSC Journeyman
SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)SSC Journeyman (76 reputation)

Group: General Forum Members
Points: 76 Visits: 48
I had to do this recently and my workaround was to have 1 row of formatted data retained under the column headings in my template but hidden.

However, that was a simple table of data without graphs and formulae. It did cause the correct formatting and data types to be applied to all lines inserted so it may work for you.
Roshan Jospeh
Roshan Jospeh
Hall of Fame
Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)

Group: General Forum Members
Points: 3153 Visits: 2093
In addition to nicks suggestion, you can use script task as per the below link

http://stackoverflow.com/questions/1954582/ssis-2008-excel-2007-formatting-excel-columns-properly-exporting-not-importin

I have not used this , but will keep this in mind so may be useful one day

----------------------------------------------------------------------------------------------------------------------------------------------------
Roshan Joe

Jeff Moden -Forum Etiquette: How to post data/code on a forum to get the best help
Jako de Wet
Jako de Wet
Say Hey Kid
Say Hey Kid (709 reputation)Say Hey Kid (709 reputation)Say Hey Kid (709 reputation)Say Hey Kid (709 reputation)Say Hey Kid (709 reputation)Say Hey Kid (709 reputation)Say Hey Kid (709 reputation)Say Hey Kid (709 reputation)

Group: General Forum Members
Points: 709 Visits: 215
Hi everyone

Just to let you know what I did.

I created a XLS template with the headers and a hidden/formatted row, this just formats the actual numbers etc. You still need to apply the font-size via a script. The formulas also seem to auto run.

So I created a C# Script file that adds all the formatting and formulas afterwards. Works really well and takes out human intervention.

Only problem is that, that was the easiest report of the 25+ I need to do...
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search