Custom export
Custom export
itxuser
Posts: 18Questions: 5Answers: 0
I need to make a custom export based on the value of the cell in my column. I have a column named 'Active', which can have the value of 'YES' or 'NO'. I need to be able to export all rows where this column is equal to 'YES', or 'NO'. Please help. Thanks.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
You can use a row selector, similar to this example using column selectors:
https://datatables.net/extensions/buttons/examples/html5/columns.html
The row selector can be a function returning true or false to filter the desired rows:
https://datatables.net/reference/type/row-selector#Function
Here is a quick example that may help you get started:
http://live.datatables.net/widixafe/1/edit
It exports all rows that have "London" in the Office column (data[2]). You will need to modify it based on your data structure and what you want to filter on.
Kevin
This was perfect! Thank you! I will remember this.