Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Export a Table to a Excel File

Export a Table to a Excel File

Scheduled Pinned Locked Moved Database
databasesql-serversysadminhelptutorial
6 Posts 6 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    faravani
    wrote on last edited by
    #1

    Hi i want export a table into database to a excel file i search s command in Sql Server That help me Export a Table in Excel File without create file manully please guide me

    N A D B T 5 Replies Last reply
    0
    • F faravani

      Hi i want export a table into database to a excel file i search s command in Sql Server That help me Export a Table in Excel File without create file manully please guide me

      N Offline
      N Offline
      Niladri_Biswas
      wrote on last edited by
      #2

      hi, the easiest way is Right Click on the result pane - >Save Result as.. You can save the result in excel.(I am sure for sql server 2005+ but unsure for 2000). Please check that if u r using 2000 version :)

      Niladri Biswas

      1 Reply Last reply
      0
      • F faravani

        Hi i want export a table into database to a excel file i search s command in Sql Server That help me Export a Table in Excel File without create file manully please guide me

        A Offline
        A Offline
        Abhishek Sur
        wrote on last edited by
        #3

        Want to do a program on this ? Or just use Management console to export result?? If you are about to build a program, you might use this : Working with MS Excel(xls / xlsx) Using MDAC and Oledb[^] Otherwise you can see what Niladri suggested in Management Console.:thumbsup:

        Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.


        My Latest Articles-->** Simplify Code Using NDepend
        Basics of Bing Search API using .NET
        Microsoft Bing MAP using Javascript

        1 Reply Last reply
        0
        • F faravani

          Hi i want export a table into database to a excel file i search s command in Sql Server That help me Export a Table in Excel File without create file manully please guide me

          D Offline
          D Offline
          dan sh
          wrote on last edited by
          #4

          Look into XP_CmdShell. That would help you achieving this thing. Make sure you enable that from Surface Area configuration.

          50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!

          1 Reply Last reply
          0
          • F faravani

            Hi i want export a table into database to a excel file i search s command in Sql Server That help me Export a Table in Excel File without create file manully please guide me

            B Offline
            B Offline
            Bassam Saoud
            wrote on last edited by
            #5

            BCP utility[^]

            1 Reply Last reply
            0
            • F faravani

              Hi i want export a table into database to a excel file i search s command in Sql Server That help me Export a Table in Excel File without create file manully please guide me

              T Offline
              T Offline
              Tripathi Swati
              wrote on last edited by
              #6

              you can use 1> DTS Export/Import utility for that please go thru http://support.microsoft.com/kb/319951[^] 2>exec master..xp_cmdshell but for that you need to enable from surface area configuration 3> BCP utility 4> you can use linked server for excel file to sql table.

              INSERT INTO OPENROWSET('Microsoft.Jet.OLEDB.4.0',
              'Excel 8.0;Database=\\servername\e$\inetpub\wwwroot\game\myexcelfile.xls;',
              'SELECT * FROM [scores]') select * from LinkedServerName.DBname.tbl_Stats

              5> SSIS package to transfer data from a table in a SQL Server 2005 database to a Microsoft Excel spreadsheet

              Reasons are not Important but Results are Important. Swati Tripathi

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups