0.1.4 • Published 5 years ago
vue-doc-reader v0.1.4
file input reader for docs
Supported Formats
.xlsx .xlsb .xlsm .xls .xml .csv
Prerequisites
- node >=10
Install
npm i vue-doc-readerUsage
In main.ts
import VueDocReader from 'vue-doc-reader'
Vue.component('vue-doc-reader',VueDocReader)In parent component template
<vue-doc-reader @onLoad="onLoad" />Props
- (optional) label:string - input label.
- (optional) includeRows:boolean - if
truethe table data will return withrowIndexproperty for each row.
Callback
onLoad event callback return {data:Array<any>,headers:Array<string>}
datarepresents array of row objects[columnName:string]:valueheadersrepresents array of columns name
onLoad(results:any){
this.data = results.data;
this.headers = results.headers
}Author
👤 daniel212
Show your support
Give a ⭐️ if this project helped you!
This README was generated with ❤️ by readme-md-generator