Export plugin support
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>