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. SQL SERVER

SQL SERVER

Scheduled Pinned Locked Moved Database
databasesql-serversysadminhelp
4 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.
  • V Offline
    V Offline
    vasini
    wrote on last edited by
    #1

    Hi, I am trying to Export Data From SqlServer Table Into Multiple Excel Worksheets. I have more than 65000 records which can not fit into one Excel worksheet. I am using BCP command in a stored procedure to export. I have searched in google and could not get solution to export to mulitple sheets from stored procedure. Please let me know if anyone can help me on this. Thanks for helping.

    D 1 Reply Last reply
    0
    • V vasini

      Hi, I am trying to Export Data From SqlServer Table Into Multiple Excel Worksheets. I have more than 65000 records which can not fit into one Excel worksheet. I am using BCP command in a stored procedure to export. I have searched in google and could not get solution to export to mulitple sheets from stored procedure. Please let me know if anyone can help me on this. Thanks for helping.

      D Offline
      D Offline
      David Mujica
      wrote on last edited by
      #2

      What I would do is create ranges to export. For example, say the data is customer data, you could easily create 26 separate files by exporting customers by the first letter of their last name. Create an A file, B file, etc. If your table is accounting in nature, use ranges of the account numbers. Ex: Account: 1000-1999, 2000-2999, etc

      V 1 Reply Last reply
      0
      • D David Mujica

        What I would do is create ranges to export. For example, say the data is customer data, you could easily create 26 separate files by exporting customers by the first letter of their last name. Create an A file, B file, etc. If your table is accounting in nature, use ranges of the account numbers. Ex: Account: 1000-1999, 2000-2999, etc

        V Offline
        V Offline
        vasini
        wrote on last edited by
        #3

        Thank you for your answer. I am looking at the same Excel File with different sheets. Please let me know.

        D 1 Reply Last reply
        0
        • V vasini

          Thank you for your answer. I am looking at the same Excel File with different sheets. Please let me know.

          D Offline
          D Offline
          David Mujica
          wrote on last edited by
          #4

          You can still divide the data extract into multiple extracts, then import them into individual sheets. Maybe I didn't understand your problem. :confused: I thought you were extracting data, then manually importing it into Excel, but after reading your question again I see that you are exporting data directly into Excel. I would still break your extract into multiple chunks and import those chunks into separate worksheets in the same Excel workbook. Take a look at this article, maybe it will be helpful ... http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=49926[^]

          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