Vue.js plugin for SheetJs js-xlsx
Install
NPM
npm i vue-js-xlsx --save
Usage
mount with global
Vue
mount with nuxt.js/ssr
// plugins/vue-js-xlsx.jsVue // nuxt.config.js ... plugins: src: '~plugins/vue-js-xlsx.js' ssr: false ...
Once installed, the plugin add $xlsx to Vue.prototype to make him easily accessibles in every components.
Documentation
See SheetJs
Methods
/** * Generates different types of JS objects * @param * @param * - parsingOpts * - sheetIndex * - Others options. See https://github.com/sheetjs/js-xlsx#json * @returns */const jsonData = this$xlsx
Bonus
Development
Compiles and hot-reloads for development
npm run serve
Compiles and minifies for production
npm run build:lib
Lints and fixes files
npm run lint