Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Export data and Fixed Data Table

I use Fixed Data Grid in my project.

https://facebook.github.io/fixed-data-table/example-sort.html

I want to take csv and pdf reports. Is it possible to export grid data to pdf or csv directly? Or what can I do to take csv and pdf reports with data provider(JSON Array) of datagrid?

like image 740
javauser35 Avatar asked Jan 13 '16 20:01

javauser35


1 Answers

Since you have access to the raw JSON data that gets displayed within the table, you should be able to use a library like Papa Parse to "unparse" the data into a csv format, which can then be downloaded.

As for converting to pdf, I would look into the jsPDF library. See this answer for details about how to do that.

like image 98
wesleysmyth Avatar answered Oct 17 '22 23:10

wesleysmyth