Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL export to Excel with formatting

Status
Not open for further replies.

kermitforney

Technical User
Mar 15, 2005
374
US
Is there anyway whether it be in TSQL or SSIS, that you can export to Excel and include formatting.

Ex. Column C is bold, column D is highlighted in yellow.

I have experience exporting plain worksheets in SSIS, but without formatting.

Thanks in advance.
 
I don't think you can apply formating while exporting (though I don't know for sure), but there are two ideas.

1. Try to import into a template based Excel.

2. Use some front-end program to apply formatting after the export.
 
You can use the Excel (Data - Import External Data) option to build your query (or import an existing one) and format your spreadsheet as you mentioned. Then the next time you pull up the spreadsheet refresh the data from the DB.

It's not an "on the fly" method but if the query is a standard type of thing you would only have to format it once. Here's a link with more information:

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top