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
 General SQL Server Forums
 New to SQL Server Programming
 Saving to Excel

Author  Topic 

jim_jim
Constraint Violating Yak Guru

306 Posts

Posted - 2010-07-26 : 10:54:05
How to save the result set to exce. using Sql server 2008 management studio.

I dont see an option to save to excel

Please help

Thanks

X002548
Not Just a Number

15586 Posts

Posted - 2010-07-26 : 11:22:31
I'm assuming you are talking about saving results from a query in manglement Studio

You can put the results in grid mode, and save results as either csv, or tab delimited text

Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page

slimt_slimt
Aged Yak Warrior

746 Posts

Posted - 2010-07-26 : 14:21:44
right click on the database where you have your data stored.
select "task" -> "export data"
select your data source (database) and select your data destination (select excel file).
go through the wizard and it will guide you through the process. you will have your sql data stored in excel file.
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2010-07-26 : 15:14:07
well expand on slim shady's idea...

IF you have a result set that's based on a query, you can save the query as a view, THEN do what slim shady said



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page

Sachin.Nand

2937 Posts

Posted - 2010-07-27 : 04:53:20
What I do is run the query in query analyzer & then right click on the top left side of the resulset grid & select the option
"Copy with Headers" & paste it in Excel.


Limitations live only in our minds. But if we use our imaginations, our possibilities become limitless.

PBUH
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2010-07-28 : 06:17:40
Here is a code to do that
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=49926

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -