Menu

Export Data from a JSTable

2007-07-05
2013-04-22
  • Ivo Baehr - IbTech

    Hello evetybody!!

    I would like if someone here has a idea or to know a way to export the data of a JSTable to Excel or to a text-file.

    Some one here can help me??

    thank's a lot!!

     
    • Luis Fernando Planella Gonzalez

      You cannot save a file, or set a file download from JavaScript, so it's not possible to do directly.
      But, if you use the table for editing, you can export the data (http://javascriptools.sourceforge.net/docs/manual/JavaScripTable_data.html) to a hidden form field and the submit it to the server. On the server application, you may create a download by writing the content of that field back to the response and setting the http headers Content-Type:text/csv and Content-Disposition:attachment;filename=file.csv
      That would be an extra roundtrip, but I cannot think another way to do it...

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.