Wednesday, March 21, 2012

formatting for writing my query to an excel sheet

Hi ,

I am executing my query and writing it to an excel sheet by choosing "query" results to an excel sheet. It does not format them well. I have trimmed my fields too. There are about 10 fields in the database and I need to show them in the excel file all the ten fields adjacent to one another. Is there anyway I can format them other than the programming aspect.

ThanksHave you tried using DTS to export your query directly into a preformatted Excel spreadsheet? While this doesn't do a 100% quality transfer, it's pretty close. Just create your Excel spreadsheet with the formatting you want, Use an export DTS wizard to walk you through putting your query as the source to be exported, then select your spreadsheet, then see if it works. You can then save it and rerun it on a schedule or manually.sql

No comments:

Post a Comment