How or can you save or export an SQL Server 2008 table to a Microsoft Excel File?

Posted on 2011-10-25
Last Modified: 2012-05-12
I am running MS SQL Server 2008. I use it in connection with a Visual Basic 2008 program that I put together using Visual Studio 2008/SQL Server 2008. My customer wants me to send her inventory in a Microsoft Excel spread sheet. I have been sending PDF files from my program. I was thinking that maybe I could some how pull the spreadsheet directly out of SQL server. Is there any way I can give her the Excel spreadsheet?
Question by:jampost
    LVL 69

    Assisted Solution

    by:Éric Moreau
    LVL 25

    Accepted Solution

    In management studio, type "select * from mytable". Before running it press Ctrl D to make the results appear as a table then in the results pane right mouse click on the little blank square to the left of the column names anad choose save results as, and it will save as csv

    Author Closing Comment

    I want to thank Emoreau & Isavidge for your help.  Isavidge's comment worked best because it walked me through the process in laymans terms - straight forward & accurate .  Thanks again.   --   Joe
    LVL 25

    Expert Comment

    by:Lee Savidge
    Glad to help.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
    This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
    The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
    This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now