• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 144
  • Last Modified:

Fastest way of getting results from grid in query anyalser in SQL Server 2005 over to excel

What is the quickest way of getting results from grid in query anyalser in SQL Server 2005 over to excel with headers and appropriate formating
0
caseyrharris
Asked:
caseyrharris
  • 2
  • 2
1 Solution
 
SwindleCommented:
Go to Tools, Options, Query Results, SQL Server, Results to Grid.  Check the option for "Include column headers when copying or saving the results".  Then you should be able to do a CTRL+a and copy it all, then paste it into excel.
0
 
caseyrharrisAuthor Commented:
Almost there, include column headers helps.  But, I still have a problem with the formating and not sure if there is a quick fix or just manually changing it in excel before the paste.  

I have data like '0E0244' which should be text within excel, but comes across as this: 0.00E+00
0
 
SwindleCommented:
Now that, I've never found a good way to do.  I generally just convert all of my columns in excel to text before I try to paste.  That way it doesn't try to do funky conversions like it does when the column type is set to General (which is the default).
0
 
caseyrharrisAuthor Commented:
Thanks for the help!
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now