Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 HOW TO COPY QUERY OUTPUT DATA TO EXCEL WITH HEADER

Author  Topic 

tahseenm
Yak Posting Veteran

64 Posts

Posted - 2013-11-04 : 13:27:21
I am trying to run the script on a Query in Sql2005. How can I copy the whole output results with header and data to excel. I could copy the data but I cant get the header. Please let me know. Thanks

moetahsen

James K
Master Smack Fu Yak Hacker

3873 Posts

Posted - 2013-11-04 : 13:37:46
I don't have a SQL 2005 installation, but as I recall it is similar to SQL 2008 - Go to Tools -> Options -> Query REsults -> SQL Server -> Results To Grid and check "Included column headers when copying or saving the results".
Go to Top of Page
   

- Advertisement -