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. Web Development
  3. ASP.NET
  4. export gridview data to ODS file

export gridview data to ODS file

Scheduled Pinned Locked Moved ASP.NET
tutorialquestion
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.
  • P Offline
    P Offline
    Praveen Kandari
    wrote on last edited by
    #1

    How to export gridview data to ODS file?

    J 1 Reply Last reply
    0
    • P Praveen Kandari

      How to export gridview data to ODS file?

      J Offline
      J Offline
      jkirkerx
      wrote on last edited by
      #2

      Well there really is no gridview data, I mean the gridview is just a display object, that packages your data into something that is easy to view. So you have to write a program to get the data, and write that file. If you did a bind in the Gridview, then your going to have to write a function to SELECT the database and store it somewhere like a class or structure, and then write your program to write the file. Use the search words How to write data to excel file and download it in asp.net https://www.google.com/search?q=How+to+write+data+to+excel+file+and+download+it+in+asp.net&ie=utf-8&oe=utf-8[^] And search for an idea of how to start. You really needed to provide more information such as ASP.Net Web Forms ASP.Net MVC

      P 1 Reply Last reply
      0
      • J jkirkerx

        Well there really is no gridview data, I mean the gridview is just a display object, that packages your data into something that is easy to view. So you have to write a program to get the data, and write that file. If you did a bind in the Gridview, then your going to have to write a function to SELECT the database and store it somewhere like a class or structure, and then write your program to write the file. Use the search words How to write data to excel file and download it in asp.net https://www.google.com/search?q=How+to+write+data+to+excel+file+and+download+it+in+asp.net&ie=utf-8&oe=utf-8[^] And search for an idea of how to start. You really needed to provide more information such as ASP.Net Web Forms ASP.Net MVC

        P Offline
        P Offline
        Praveen Kandari
        wrote on last edited by
        #3

        Thank you Jkirkerx for your reply and sorry for not providing full detail. By gridview data I mean Data displayed on gridview after fetching it from the database. And it is in Asp.net web form. I have exported data to doc,pdf,excel,csv, and now I want to export the data into .ods file.

        J 1 Reply Last reply
        0
        • P Praveen Kandari

          Thank you Jkirkerx for your reply and sorry for not providing full detail. By gridview data I mean Data displayed on gridview after fetching it from the database. And it is in Asp.net web form. I have exported data to doc,pdf,excel,csv, and now I want to export the data into .ods file.

          J Offline
          J Offline
          jkirkerx
          wrote on last edited by
          #4

          Excel was more popular to write on the server, but there is limited support for it. I wrote some code to export data to a worksheet, and it was difficult to understand, especially placing images on the sheet, and embedding them in the file. The .ODS appears to be just XML, so your going to probably have to create a file in a program, and look at the structure of it, to figure out what your XML structure should be. http://www.codeguru.com/csharp/csharp/cs_data/xml/article.php/c16311/How-to-Read-and-Write-ODFODS-Files-OpenDocument-Spreadsheets.htm[^] I could not find much on the subject by doing a search.

          P 1 Reply Last reply
          0
          • J jkirkerx

            Excel was more popular to write on the server, but there is limited support for it. I wrote some code to export data to a worksheet, and it was difficult to understand, especially placing images on the sheet, and embedding them in the file. The .ODS appears to be just XML, so your going to probably have to create a file in a program, and look at the structure of it, to figure out what your XML structure should be. http://www.codeguru.com/csharp/csharp/cs_data/xml/article.php/c16311/How-to-Read-and-Write-ODFODS-Files-OpenDocument-Spreadsheets.htm[^] I could not find much on the subject by doing a search.

            P Offline
            P Offline
            Praveen Kandari
            wrote on last edited by
            #5

            Thanks a lot Jkirkerx.:)

            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