Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

get data from excel using vue js

//npm install read-excel-file --save
//excel file only

<template>
	<input type="file" @change="onFileChange" />
</template>
import readXlsxFile from 'read-excel-file'
export default {
  	methods: {
        onFileChange(e) {
            var file = e.target.files ? e.target.files[0] : null;
            readXlsxFile(file).then((data) => {
            	console.log(data)
            })
        }
    }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #data #excel #vue #js
ADD COMMENT
Topic
Name
5+4 =