Skip to content

Commit a49a8bc

Browse files
committed
@ Updates readme file.
1 parent dcd327a commit a49a8bc

File tree

1 file changed

+35
-16
lines changed

1 file changed

+35
-16
lines changed

README.md

Lines changed: 35 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,40 @@
11
# vue-json2excel
22

3-
## Project setup
4-
```
5-
yarn install
6-
```
7-
8-
### Compiles and hot-reloads for development
9-
```
10-
yarn run serve
11-
```
3+
A lightweight vue js component uses [xlsx](https://github.com/SheetJS/js-xlsx) library to export json data into an excel file.
124

13-
### Compiles and minifies for production
14-
```
15-
yarn run build
16-
```
175

18-
### Lints and fixes files
19-
```
20-
yarn run lint
6+
## Project setup
217
```
8+
npm install vue-json2-excel --save
9+
```
10+
or
11+
```
12+
yarn add vue-json2-excel
13+
```
14+
## Usage
15+
```
16+
<template>
17+
<json2-excel
18+
:data="data"
19+
:header="headers"
20+
:details="{text:'This is a test text appears in details section of execl file'}">
21+
export
22+
</json2-excel>
23+
</template>
24+
25+
<script>
26+
import Json2Excel from 'vue-json2excel';
27+
28+
export default{
29+
data(){
30+
return{
31+
data:[['aref','hosseinikia'],['feri','tajedin']],
32+
headers:['first_name','last_name'],
33+
}
34+
},
35+
components:{
36+
Json2Excel
37+
}
38+
}
39+
</script>
40+
```

0 commit comments

Comments
 (0)