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. General Programming
  3. C#
  4. Export to Excel From Data Grid In C# Windows Application

Export to Excel From Data Grid In C# Windows Application

Scheduled Pinned Locked Moved C#
questioncsharpcss
7 Posts 5 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.
  • M Offline
    M Offline
    ManojKumar19
    wrote on last edited by
    #1

    I have creted windows application in which I am showing data in one grid.This grid having 50000 lines. I want grid data to be exported to excel . How do I expoert to excel from data grid view ? Thanks In advance !!!!!!!!! :)

    C H D F 4 Replies Last reply
    0
    • M ManojKumar19

      I have creted windows application in which I am showing data in one grid.This grid having 50000 lines. I want grid data to be exported to excel . How do I expoert to excel from data grid view ? Thanks In advance !!!!!!!!! :)

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      You export your data, the easiest way is to write a csv.

      Christian Graus Driven to the arms of OSX by Vista. "! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums. I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp

      1 Reply Last reply
      0
      • M ManojKumar19

        I have creted windows application in which I am showing data in one grid.This grid having 50000 lines. I want grid data to be exported to excel . How do I expoert to excel from data grid view ? Thanks In advance !!!!!!!!! :)

        H Offline
        H Offline
        Henry Minute
        wrote on last edited by
        #3

        A simple google search on c# to excel got over 10 million hits. I assume therefore, that you have read all of the relevant ones, distilled their content and attempted the task yourself. What have you tried so far? Where did it go wrong? Be precise, it's annoying to have to read through lots of irrelevant code. :)

        Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”

        1 Reply Last reply
        0
        • M ManojKumar19

          I have creted windows application in which I am showing data in one grid.This grid having 50000 lines. I want grid data to be exported to excel . How do I expoert to excel from data grid view ? Thanks In advance !!!!!!!!! :)

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

          System.Data.OleDb

          M 1 Reply Last reply
          0
          • D dan sh

            System.Data.OleDb

            M Offline
            M Offline
            ManojKumar19
            wrote on last edited by
            #5

            Finally got solution....... Export a DataSet to Microsoft Excel without the use of COM objects[^]

            1 Reply Last reply
            0
            • M ManojKumar19

              I have creted windows application in which I am showing data in one grid.This grid having 50000 lines. I want grid data to be exported to excel . How do I expoert to excel from data grid view ? Thanks In advance !!!!!!!!! :)

              F Offline
              F Offline
              FilipKrnjic
              wrote on last edited by
              #6

              Hi, as d@nish said you could use System.Data.OleDb but for faster and easier work you should use some 3rd party component like GemBox spreadsheet component

              M 1 Reply Last reply
              0
              • F FilipKrnjic

                Hi, as d@nish said you could use System.Data.OleDb but for faster and easier work you should use some 3rd party component like GemBox spreadsheet component

                M Offline
                M Offline
                ManojKumar19
                wrote on last edited by
                #7

                I got the solution http://www.codeproject.com/KB/dotnet/ExportToExcel.aspx?

                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