DTS to an excel spreadsheet

  • I have created a dts package (SQL 2000) that exports data to several excel spreadsheets and then emails the file if it was populated. Is it possible to transpose the columns and rows? I would like my headings to be in column a and the data in column b, c, d, etc. I know you can do this using "paste special" in excel, but it would be better if i could just export the data in this format.

    Thanks in advance.

  • I do not think you can in SQL 2000 unless you write your own code. SQL 2005 has pivot feature, which may help.

    Please correct me if anyone has any different opinion.

  • YOu can use the openrowset property to export data from sql to excel (key in OPENROWSET in BOL) as for the format you can use a cursor (not recommended) because when it comes to large database/tables it's a pain using cursors but for the question if this is possible yes it is..

    "-=Still Learning=-"

    Lester Policarpio

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply