Score
0
Watch 9 Star 15 Fork 5

XE / vxe-table-plugin-export-xlsxTypeScriptMIT

Create your Gitee Account
Explore and code with more than 5 million developers,Free private repositories !:)
Sign up
基于 vxe-table 表格的增强插件,支持导出 xlsx 格式 spread retract

Clone or download
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README.md

vxe-table-plugin-export-xlsx

gitee star npm version npm downloads gzip size: JS npm license

基于 vxe-table 表格的增强插件,支持导出 xlsx 格式

Installing

npm install xe-utils vxe-table vxe-table-plugin-export-xlsx xlsx
// ...
import VXETablePluginExportXLSX from 'vxe-table-plugin-export-xlsx'
// ...

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-table-column type="index" width="60"></vxe-table-column>
  <vxe-table-column field="name" title="Name"></vxe-table-column>
  <vxe-table-column field="age" title="Age"></vxe-table-column>
  <vxe-table-column field="date" title="Date"></vxe-table-column>
</vxe-table>
export default {
  data () {
    return {
      tableData: [
        {
          id: 100,
          name: 'test',
          age: 26,
          date: null
        }
      ]
    }
  },
  methods: {
    exportEvent() {
      this.$refs.xTable.exportData({
        filename: 'export',
        sheetName: 'Sheet1',
        type: 'xlsx'
      })
    }
  }
}

License

MIT © 2019-present, Xu Liangzhan

Comments ( 0 )

Sign in for post a comment

TypeScript
1
https://gitee.com/x-extends/vxe-table-plugin-export-xlsx.git
git@gitee.com:x-extends/vxe-table-plugin-export-xlsx.git
x-extends
vxe-table-plugin-export-xlsx
vxe-table-plugin-export-xlsx
master

Search