Skip to content

Export plugin support

Compare
Choose a tag to compare
@revolist revolist released this 31 Dec 22:31
· 291 commits to main since this release

Added export to Excel (CSV)

  • Now grid support export to excel. Stacked headers preserved. No row headers included.
<template>
<vue-datagrid :columns="..."  :source="..."   :export="true" ref="grid"/>
</template>

<script>
export default {
     methods: {
        async onExport() {
          this.$refs.grid.getPlugins().then(plugins => {
               plugins.forEach(p => {
                   if (p.exportFile) {
                       const exportPlugin = p;
                       exportPlugin.exportFile({  filename: 'new file' });
                   }
             })
          });
        }
     }
}
</script>