vue-js-xlsx

SheetJs js-xlsx plugin for Vue.js
14,087
Install
npm install vue-js-xlsx
Latest Version:0.0.2
Vue:2
License:MIT
Last Updated:Apr 4, 2019
Links: npm
Maintainer: magr0s

Vue js-xlsx Current version

Vue.js version xlsx version License

Vue.js plugin for SheetJs js-xlsx

Install

NPM
npm i vue-js-xlsx --save

Usage

mount with global
import VueXlsx from 'vue-js-xlsx'
Vue.use(VueXlsx)
mount with nuxt.js/ssr
// plugins/vue-js-xlsx.js
import VueXlsx from 'vue-js-xlsx'
Vue.use(VueXlsx)

// 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 {Blob} data
 * @param {Object} options
 * - parsingOpts {Object} See https://github.com/sheetjs/js-xlsx#parsing-options
 * - sheetIndex {Number} Select the sheet number you want to convert. Default: 0
 * - Others options. See https://github.com/sheetjs/js-xlsx#json
 * @returns {Array} array of objects

 */
const jsonData = this.$xlsx.toJson(data, options)

Bonus

Vue FileReader component

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

Author

magr0s

License

MIT

Related Packages

vue3-xlsx

This vue Library is a vue wrapper for the excellent: sheet-js The aim of this li...

51,058 14
vue-xlsx

This vue Library is a vue wrapper for the excellent: sheet-js The aim of this li...

35,636 42
eltable-as-xlsx

下载el-table为xlsx

1,791 1
vue-xlsx-table

View .xlsx file in browser for Vue2

6,582 149

Version History

Version Released Vue License
0.0.2 ^2.6.6 MIT