how datatables export on an array returned by an ajax request
how datatables export on an array returned by an ajax request

I have a thymeleaf page which once loaded launches an ajax request which returns only an array. how to use datatables to export the data of my table knowing that the header of the table comes from the server as well as the body which uses a condition to display certain columns.
that is the return ajax table in main page:
Station | Produit1 | Produit1 | Total (Montant/Volume) | Total (Montant/Volume) | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Montant | Volume | Montant | Volume | Montant | Volume | Montant | Volume | |||
Station | 100000 fcfa | 245 L | 100000 fcfa | 245 L | 100000 fcfa | 245 L | 999999 fcfa | 9457 L | ||
Total | 800000 fcfa | 8245 L | 800000 fcfa | 8245 L | 800000 fcfa | 8245 L | M fcfa | V L |
sorry i'm new in this forum and i don't know how to use it
This discussion has been closed.
Answers
See the example for Buttons, there are example there on how to export.
Colin