4.0.7 • Published 2 months ago

vxe-table-plugin-export-xlsx v4.0.7

Weekly downloads
343
License
MIT
Repository
github
Last release
2 months ago

vxe-table-plugin-export-xlsx

gitee star npm version npm downloads npm license

基于 vxe-table 的表格插件,支持导出 xlsx 格式,基于 exceljs 实现

Compatibility

对应 vxe-table v3 版本

Installing

npm install vxe-table@legacy vxe-table-plugin-export-xlsx@legacy exceljs
// ...
import VXETable from 'vxe-table'
import VXETablePluginExportXLSX from 'vxe-table-plugin-export-xlsx'
import ExcelJS from 'exceljs'
// ...

// 方式1:NPM 安装,注入 ExcelJS 对象
VXETable.use(VXETablePluginExportXLSX, {
  ExcelJS
})

// 方式2:CDN 安装,只要确保 window.ExcelJS 存在即可
// VXETable.use(VXETablePluginExportXLSX)

Demo

<vxe-toolbar>
  <template v-slot:buttons>
    <vxe-button @click="exportEvent">导出.xlsx</vxe-button>
  </template>
</vxe-toolbar>

<vxe-table
  ref="xTable"
  height="600"
  :data="tableData">
  <vxe-column type="seq" width="60"></vxe-column>
  <vxe-column field="name" title="Name"></vxe-column>
  <vxe-column field="age" title="Age"></vxe-column>
  <vxe-column field="date" title="Date"></vxe-column>
</vxe-table>
export default {
  data () {
    return {
      tableData: [
        { id: 100, name: 'test', age: 26, date: null },
        { id: 101, name: 'test1', age: 30, date: null },
        { id: 102, name: 'test2', age: 34, date: null }
      ]
    }
  },
  methods: {
    exportEvent() {
      this.$refs.xTable.exportData({
        filename: 'export',
        sheetName: 'Sheet1',
        type: 'xlsx'
      })
    }
  }
}

License

MIT © 2019-present, Xu Liangzhan

3.3.7

2 months ago

4.0.7

2 months ago

3.3.6

2 months ago

4.0.6

3 months ago

3.3.5

2 months ago

3.3.4

3 months ago

3.3.3

3 months ago

4.0.5

6 months ago

4.0.4

6 months ago

4.0.3

6 months ago

4.0.2

7 months ago

3.3.1

6 months ago

3.3.2

6 months ago

3.3.0

11 months ago

4.0.1

11 months ago

4.0.0

11 months ago

2.2.3

1 year ago

2.2.5

1 year ago

2.2.4

1 year ago

2.2.6

1 year ago

3.0.8

1 year ago

3.0.7

1 year ago

3.0.6

1 year ago

3.0.5

1 year ago

2.3.0

1 year ago

2.3.1

1 year ago

3.1.0

1 year ago

3.0.4

2 years ago

2.2.2

3 years ago

3.0.3

3 years ago

3.0.2

4 years ago

2.2.1

4 years ago

2.2.0

4 years ago

3.0.1

4 years ago

3.0.0

4 years ago

3.0.0-beta.1

4 years ago

3.0.0-beta.3

4 years ago

3.0.0-beta.2

4 years ago

3.0.0-beta.5

4 years ago

3.0.0-beta.4

4 years ago

3.0.0-beta.0

4 years ago

3.0.0-alpha.2

4 years ago

2.1.2

4 years ago

2.1.1

4 years ago

3.0.0-alpha.1

4 years ago

2.1.0

4 years ago

2.1.0-beta.1

4 years ago

2.1.0-beta.0

4 years ago

2.1.0-beta

4 years ago

2.0.7

4 years ago

2.0.9

4 years ago

2.0.8

4 years ago

2.0.6

4 years ago

3.0.0-alpha.0

4 years ago

2.0.5

4 years ago

2.0.4

4 years ago

2.0.3

4 years ago

2.0.2

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

2.0.0-beta.0

4 years ago

1.6.4

4 years ago

1.6.3

4 years ago

1.6.2

4 years ago

1.6.1

4 years ago

1.6.0

4 years ago

1.5.0

5 years ago

1.3.13

5 years ago

1.3.12

5 years ago

1.3.11

5 years ago

1.3.10

5 years ago

1.3.9

5 years ago

1.3.8

5 years ago

1.3.7

5 years ago

1.3.6

5 years ago

1.3.5

5 years ago

1.3.4

5 years ago

1.3.3

5 years ago

1.3.1

5 years ago

1.3.0

5 years ago

1.3.0-alpha.0

5 years ago

1.2.2

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.0.0-alpha.4

5 years ago

1.0.0-alpha.3

5 years ago

1.0.0-alpha.2

5 years ago

1.0.0-alpha.1

5 years ago