1 Star 2 Fork 2

smallwei / avue-plugin-excel

Create your Gitee Account
Explore and code with more than 8 million developers,Free private repositories !:)
Sign up
Clone or Download
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README.md

Avue Excel导入导出插件

Avue官网

https://avuejs.com

介绍

使用

1.安装
npm install avue-plugin-excel --save

2.导入
import $Excel from 'avue-plugin-excel'

3.使用

导出
let opt = {
  title: '文档标题',
  column: [{
    label: '复杂表头',
    prop: 'header',
    children: [
      {
        label: '姓名',
        prop: 'name'
      }, {
        label: '年龄',
        prop: 'sex'
      }
    ]
  }],
  data: [{
    name:'张三',
    sex:12
  }]
}
$Excel.excel({
  title: opt.title,
  columns: opt.column,
  data: opt.data
});


导入
//files为excel文件
$Excel.xlsx(files).then(data => {
  console.log(data.results) //导出的json数组
})

Repository Comments ( 1 )

Sign in to post a comment

About

Avue的Excel导入导出插件 expand collapse
JavaScript
MIT
Cancel

Releases

No release

Contributors

All

Activities

Load More
can not load any more
1
https://gitee.com/smallweigit/avue-plugin-excel.git
git@gitee.com:smallweigit/avue-plugin-excel.git
smallweigit
avue-plugin-excel
avue-plugin-excel
master

Search