export gridview data to ODS file
-
How to export gridview data to ODS file?
-
How to export gridview data to ODS file?
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
-
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
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.
-
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.
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.
-
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.
Thanks a lot Jkirkerx.:)