6

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 1

8

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

Sign up to request clarification or add additional context in comments.

1 Comment

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.