esvit / ng-table-export

Export data from ngTable to CSV
BSD 3-Clause "New" or "Revised" License
44 stars 95 forks source link

Exporting specific columns #4

Open haukurst opened 10 years ago

haukurst commented 10 years ago

In a project I am working on I had a ng-table where the user could choose which column he wanted to see dynamically, much like this example: http://bazalt-cms.com/ng-table/example/20 When I wanted to export the data to csv however it would take the whole table instead of the columns I had selected, so I added a little code that would check if any of the headers in the table had a class called 'no-export', which indicated that those columns should not be exported. So the data to be exported would only be the columns he had selected. It works for any number of columns and I hope it can be of any help.

andrewboni commented 10 years ago

+1 on this. Still not yet merged to master?