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
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Exporting data from sqlserver to Excel

Exporting data from sqlserver to Excel

Scheduled Pinned Locked Moved Database
3 Posts 2 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.
  • T Offline
    T Offline
    Tech_spidy
    wrote on last edited by
    #1

    hi, i need a help in an automation of data fetch from db to excel. I am having 2 tables in sql server db. at present i will type hundreds of number in excel sheet then i will import that to sql server as a table then executing that table and the primary table using some sql statement i used to fetch the required information. now the problem is when we are doing it for multiple records its too difficult to repeat the process repeatedly.so i want to automate this process. for example: primary table: slno eno,ename, eaddress, ecity exporting data through excel is eno comparing this eno in excel with the primary table i can fetch the remining details to the specified set of eno. how to automate if anyone have idea please share it. so that i can begin my process as soon as possible.

    Tech_spidy

    K 1 Reply Last reply
    0
    • T Tech_spidy

      hi, i need a help in an automation of data fetch from db to excel. I am having 2 tables in sql server db. at present i will type hundreds of number in excel sheet then i will import that to sql server as a table then executing that table and the primary table using some sql statement i used to fetch the required information. now the problem is when we are doing it for multiple records its too difficult to repeat the process repeatedly.so i want to automate this process. for example: primary table: slno eno,ename, eaddress, ecity exporting data through excel is eno comparing this eno in excel with the primary table i can fetch the remining details to the specified set of eno. how to automate if anyone have idea please share it. so that i can begin my process as soon as possible.

      Tech_spidy

      K Offline
      K Offline
      kubben
      wrote on last edited by
      #2

      I would used DTS. It comes with SQL Server. If you have sql server 2000 go to where you start enterprise manager. There is an icon that says import export. If you are using sql 2005 you need to go to the database you want to export the table. Right click the database go to tasks then export. Pick your sql server name and database to export from. Pick Excel from the drop down and set the output file name. Then pick the table / table names or do a query. I think that could work pretty nice for you process. I hope that helps. Ben

      T 1 Reply Last reply
      0
      • K kubben

        I would used DTS. It comes with SQL Server. If you have sql server 2000 go to where you start enterprise manager. There is an icon that says import export. If you are using sql 2005 you need to go to the database you want to export the table. Right click the database go to tasks then export. Pick your sql server name and database to export from. Pick Excel from the drop down and set the output file name. Then pick the table / table names or do a query. I think that could work pretty nice for you process. I hope that helps. Ben

        T Offline
        T Offline
        Tech_spidy
        wrote on last edited by
        #3

        This is what i am already doing. I need a solution like by clicking a single button it has to export the data by executing the query in db.

        Tech_spidy

        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