Not need upload, view xlsx or xls file in your browser, Supported by js-xlsx. Live Demo
- vue: ^2.0.0
npm install vue-xlsx-table --save
import vueXlsxTable from 'vue-xlsx-table'
Vue.use(vueXlsxTable, {rABS: false}) //Browser FileReader API have two methods to read local file readAsBinaryString and readAsArrayBuffer, default rABS false
<template>
<div id="app">
<h1>vue-xlsx-table</h1>
<vue-xlsx-table @on-select-file="handleSelectedFile"></vue-xlsx-table>
</div>
</template>
<script>
export default {
name: 'app',
methods: {
handleSelectedFile (convertedData) {
console.log(convertedData)
}
}
}
</script>
npm run dev //develop
npm run build //production