Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server DTS
|
SQL Server DTS Discussion specific to Data Transformation Service with SQL Server. General SQL Server discussions should use the general SQL Server forum. Readers of the book Professional SQL Server 2000 DTS with questions specific to that book should post in that book forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server DTS section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 28th, 2005, 04:45 PM
Authorized User
 
Join Date: Nov 2005
Posts: 87
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to x_ray
Default transforming data to Excel

hi all,

i have a table in my SQL Server DB, i want to transform the every row in it to an Excel sheet/file,example:

table1 in DB:
fistname lastname DOB
aaaaa bbbb 28/12/2005
cccc dddd 31/2/2006
...

i want it to be in excel for every row:
firstname:aaaa
lastname:bbbb
DOB:28/12/2005
...
i want for every row a new sheet, is this possible?
hope this is clear, thanks

 
Old December 30th, 2005, 01:07 AM
Friend of Wrox
 
Join Date: Dec 2005
Posts: 146
Thanks: 0
Thanked 1 Time in 1 Post
Default

Possibilities (imagined but not tested)
1) Use the Select FOR XML to get your data in XML then use XSLT to transform the XML to a format that excel can use and write that out -- see my reply to the topic DTS Package Fails When Scheduled in this same forum.
XML Excel format http://msdn.microsoft.com/library/de.../odc_xmlss.asp
2) Use the SELECT FOR XML WITH EXCPLICIT to transform directly to Excel XML format
3) Use the Excel COM to write the Excel file (warning: Performance will be slow and requires the Excel app to be installed on server)
4) Use 3rd party app accessible in COM that writes Excel files


David Lundell
Principal Consultant and Trainer
www.mutuallybeneficial.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
Transforming data in required XML Format pvasudevan XSLT 6 September 6th, 2006 02:34 AM
Transforming XML data in an ASP file using XSLT hussainm Classic ASP XML 0 May 31st, 2006 03:21 PM
Converting excel data to Access using excel VBA ShaileshShinde VB Databases Basics 1 April 26th, 2006 07:57 AM
Export data from data grid to excel pomoc VB.NET 2002/2003 Basics 0 December 16th, 2005 03:11 PM
Transforming data and same labels in source table riuryK SQL Server DTS 1 April 5th, 2004 05:18 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.