# vue-json-excel **Repository Path**: mirrors_SergioCrisostomo/vue-json-excel ## Basic Information - **Project Name**: vue-json-excel - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2020-09-25 - **Last Updated**: 2025-12-14 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # JSON to Excel for VUE 2 Download your JSON data as an excel file directly from the browser. This component it's based on the solution proposed on this thread https://stackoverflow.com/questions/17142427/javascript-to-export-html-table-to-excel # FIX [03-08-2017] downloaded file works with Microsoft Office ## ✔ Getting started Get the package: ```bash npm install vue-json-excel ``` Register JsonExcel in your app entrypoint: ```js import Vue from 'vue' import JsonExcel from 'vue-json-excel'; Vue.component('downloadExcel', JsonExcel); const app = new Vue({ el: '#app', data: { json_fields : { "name" : "String", "city" : "String", "country" : "String", "birthdate" : "String", "amount" : "Number" }, json_data : [ { "name" : "Tony Peña", "city" : "New York", "country" : "United States", "birthdate" : "1978-03-15", "amount" : 42 }, { "name" : "Thessaloniki", "city" : "Athens", "country" : "Greece", "birthdate" : "1987-11-23", "amount" : 42 } ], json_meta: [ { "key": "charset", "value": "utf-8" } ], ``` In your HTML call it like ```html Download Excel (you can customize this with html code!) ``` json_data contains the data you want to export, json_fields is a type mapping for the fields in the json, name is the file name. ## License MIT #### Status This project is in an early stage of development. Any contribution is welcome :D