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
 Other SQL Server Topics (2005)
 SSMS Report to file

Author  Topic 

ells
Starting Member

25 Posts

Posted - 2008-08-14 : 11:10:15
Hi,
bit of an annoying issue.

In SSMS click new query. Type in the sql, click Query on the toolbar and then Results to and click file as the appropriate option.

Now execute the SQL and it prompts for the file destination (.rpt is the default). Now one of our team can do this and he can open the results in Excel. I cant. I can get it to a file that is comma or tab delimited. I want to double click and it goes to excel straight away.

Any suggestions gratefully appreciated. Many Thanks.
Ells

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2008-08-14 : 23:08:59
You can set that in ssms -> query window -> tools -> option -> query results -> sql server tab.
Go to Top of Page

ells
Starting Member

25 Posts

Posted - 2008-08-15 : 02:48:50
Yes,
now that will export by default to a .rpt file. I have been saving it as .xls or .csv. When I open the .xls or .csv the formatting in the file is all wrong i.e each row returned resides in one cell. So If I have 5 columns in the grid when I use results to file I get all five columns in one cell!

I am hoping to be able to open the results file in Excel without any manipultaing or opening and then setting the delimiters.

Many Thanks.
Mark,
Go to Top of Page
   

- Advertisement -