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. How can I take data from a datagrid and display it in an Excel Spreadsheet?

How can I take data from a datagrid and display it in an Excel Spreadsheet?

Scheduled Pinned Locked Moved C#
questionhelp
5 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.
  • W Offline
    W Offline
    Walaza
    wrote on last edited by
    #1

    Hi, How does one take data from a datagrid and display it in an Excel spreadsheet? I have got data in a datagrid and would like to import it to a spreadsheet. Please help.

    Mvelo Walaza Developer Telkom SA

    B 1 Reply Last reply
    0
    • W Walaza

      Hi, How does one take data from a datagrid and display it in an Excel spreadsheet? I have got data in a datagrid and would like to import it to a spreadsheet. Please help.

      Mvelo Walaza Developer Telkom SA

      B Offline
      B Offline
      buchstaben
      wrote on last edited by
      #2

      what about this? http://www.codeproject.com/KB/webforms/DAtaGridExportToExcel.aspx[^]

      W 1 Reply Last reply
      0
      • B buchstaben

        what about this? http://www.codeproject.com/KB/webforms/DAtaGridExportToExcel.aspx[^]

        W Offline
        W Offline
        Walaza
        wrote on last edited by
        #3

        Hi, Thanks for the reply, but I am doing a Windows application. So how different is the code from this article to the one of a Windows application? Or is there an article that demonstrates how to import from a (Windows application) to an Excel spreadsheet?

        Mvelo Walaza Developer Telkom SA

        B 1 Reply Last reply
        0
        • W Walaza

          Hi, Thanks for the reply, but I am doing a Windows application. So how different is the code from this article to the one of a Windows application? Or is there an article that demonstrates how to import from a (Windows application) to an Excel spreadsheet?

          Mvelo Walaza Developer Telkom SA

          B Offline
          B Offline
          buchstaben
          wrote on last edited by
          #4

          Walaza wrote:

          So how different is the code from this article to the one of a Windows application

          since the control is the same, the code shouldnt differ a lot. try out and ask again, if you get stuck.

          W 1 Reply Last reply
          0
          • B buchstaben

            Walaza wrote:

            So how different is the code from this article to the one of a Windows application

            since the control is the same, the code shouldnt differ a lot. try out and ask again, if you get stuck.

            W Offline
            W Offline
            Walaza
            wrote on last edited by
            #5

            What do I replace the ff with: Response.Clear(); Response.AddHeader("content-disposition", "attachment;filename=FileName.txt"); etc because 'Response.' is not known in a Windows application.

            Mvelo Walaza Developer Telkom SA

            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