SMSS: Send results of query directly to Excel

  • I know I can Import/Export data to Excel, but I keep running into situations where I need to just get the data from a query window out to Excel. I can send it to Text (in a @#$@ Unicode file), but I don't see where I can just shoot it out to Excel. Any ideas?

    thx

    Tim

    Tim Mitchell, Microsoft Data Platform MVP
    Data Warehouse and ETL Consultant
    TimMitchell.net | @Tim_Mitchell | Tyleris.com
    ETL Best Practices

  • Don't take this the wrong way, but did you try right clicking on the output grid and selecting "Save As"?

    You can save a result grid in management studio to csv (which will most likely be opened by Excel by default).

    I have a lot of data with commas, so csv sucks for me. As an alternative, I have my management studio options defaulting to queries to text outputting to tab delimited format which through the wonder of copy and paste becomes an excel spreadsheet very easily - this includes the column headers for me.

    When I want to see the results in management studio, I switch my results to grid. I like the column-aligned text output, but the handy copy and paste to excel swayed me.

  • Yep, tried that but it doesn't render in Excel properly.

    Tim Mitchell, Microsoft Data Platform MVP
    Data Warehouse and ETL Consultant
    TimMitchell.net | @Tim_Mitchell | Tyleris.com
    ETL Best Practices

  • OK, I retried your suggestion using Text output instead of Grid. It works like a champ in Text mode. Thanks!

    Tim Mitchell, Microsoft Data Platform MVP
    Data Warehouse and ETL Consultant
    TimMitchell.net | @Tim_Mitchell | Tyleris.com
    ETL Best Practices

  • Other options in this link[/url]

  • Sql Junkie (9/27/2007)


    Other options in this link[/url]

    that's text mode 😉


    * Noel

Viewing 6 posts - 1 through 5 (of 5 total)

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