file input reader for docs
.xlsx .xlsb .xlsm .xls .xml .csv
- node >=10
npm i vue-doc-reader
In main.ts
import VueDocReader from 'vue-doc-reader'
Vue.component('vue-doc-reader',VueDocReader)
In parent component template
<vue-doc-reader @onLoad="onLoad" />
- (optional) label:string - input label.
- (optional) includeRows:boolean - if
true
the table data will return withrowIndex
property for each row.
onLoad event callback return {data:Array<any>,headers:Array<string>}
data
represents array of row objects[columnName:string]:value
headers
represents array of columns name
onLoad(results:any){
this.data = results.data;
this.headers = results.headers
}
๐ค daniel212
Give a โญ๏ธ if this project helped you!