0.1.4 • Published 4 years ago

vue-doc-reader v0.1.4

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

file input reader for docs

Supported Formats

.xlsx .xlsb .xlsm .xls .xml .csv

Prerequisites

  • node >=10

Install

npm i vue-doc-reader

Usage

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 true the table data will return with rowIndex property for each row.

Callback

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
  }

Author

👤 daniel212

Show your support

Give a ⭐️ if this project helped you!


This README was generated with ❤️ by readme-md-generator