I am new for vuetify and faced problem with exporting my v-data-table to excel, csv format. How can i do it. Any suggestion or reccomondation. Thank you so much.
1 Answer
You can use vue-json-to-csv to export the table data to a csv file:
<vue-json-to-csv
:json-data="yourList"
:csv-title="'fileName'"
>
<v-btn color="success" class="mr-6">
Export <i class="mdi mdi-export-variant" aria-hidden="true"></i>
</v-btn>
</vue-json-to-csv>
Make sure to pass yourList as the data and fileName as the desired outputted file name.
Here is the link for more details: https://www.npmjs.com/package/vue-json-to-csv
1 Comment
Wesley Cheek
Note:
vue-json-to-csv hasn't published in 5 years and is currently only available for Vue.js 2. Try vue-json-csv instead.