1.0.2 • Published 3 years ago

export-excel-sheet-vue-js v1.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

export-excel-sheet-vue-js

Convert your data as an XLSX file

Getting started

    npm install export-excel-sheet-vue-js --save

Import export-excel-sheet-vue-js in your app:

    import ExportExcelSheetVueJs from "export-excel-sheet-vue-js";
    import Vue from "vue";

    Vue.use(ExportExcelSheetVueJs);

Add in your template

    <ExportExcelSheetVueJs
        :sheetData="sheetrows"
        :columns="columns"
        :filename="filename"
        :sheetname="sheetname"
        >
        Download
    </ExportExcelSheetVueJs>

Add in your script

        data() {
            return {
                columns : [
                       {
                        label: "Student Name",
                        field: "studentName",
                    },
                    {
                        label: "Registration Number / PRN",
                        field: "regno",
                    },
                ],
                data : [
                    {
                        studentName: "Dhanesh Pawar",
                        regno: 10,
                    },
                    {
                        studentName: "Student two name",
                        regno: 30,
                    }
                ],
            }
        }