Excel Export button from dataTable using VUEJS
Excel Export button from dataTable using VUEJS
Hello,
I am struggling to make an excel export button using the dataTable object within a vue instance. As in the test link below,
I can:
1. make the vuejs display the data from an array in HTML (using a v-for directive). This will be mandatory for me.
2. make the dataTable embed the HTML table with functions such as "sort by", "search", "pagination".
However, I can't make it display the Excel export button.
I appreciate any help. Thanks.
<a class="jsbin-embed" href="http://live.datatables.net/jesepofo/6/embed?html,js,output">DataTables - JS Bin</a>
Replies
The test case doesn't seem to run and I'm not famliliar with vue but you might need to swap the order of these includes:
I believe
dataTables.buttons.js
requiresjquery.dataTables.js
sojquery.dataTables.js
needs to be loaded first.Kevin
Thanks for replying Kevin. I changed the library order and, just for future readers reference, the dataTable call had to be changed from MOUNTED to UPDATED to work properly. Now it is working like a charm.