revolist / revogrid

Powerful virtual data grid smartsheet with advanced customization. Best features from excel plus incredible performance 🔋
https://rv-grid.com
MIT License
2.77k stars 174 forks source link

Export CSV plugin missing? #221

Closed JohnRSim closed 3 years ago

JohnRSim commented 3 years ago

Describe the issue Trying to initiate export in v3 vanilla

     <!--First need to import 3rd party dropdown plugin-->
     <script src="https://cdn.jsdelivr.net/npm/@revolist/revo-dropdown@latest/dist/revo-dropdown/revo-dropdown.js"></script>
     <!--Second import plugin for revo-grid which provides column editor as select -->
     <script src="https://cdn.jsdelivr.net/npm/@revolist/revogrid-column-select@latest/dist/main.js"></script>
     <!--Revogrid -->

    <script src="https://unpkg.com/@revolist/revogrid@latest/dist/revo-grid/revo-grid.js"></script>
<revo-grid bind:this="{grid}" theme="material" export="true" />

These are the plugins available could not find one with 'exportFile'

image

console.log('download',grid)
grid.getPlugins().then(plugins => {
    console.log(plugins)
    plugins.forEach(p => {
        console.log('plugin',p)
        if (p.exportFile) {
            console.log('init download')
            const exportPlugin = p;
            exportPlugin.exportFile({  filename: 'new file' });
        }
    })
});
odex21 commented 3 years ago

You can try

<revo-grid bind:this="{grid}" theme="material" exporting="true" />
odex21 commented 3 years ago

The doc on website is out of date, see https://github.com/revolist/revogrid/tree/master/src/components/revo-grid

revolist commented 3 years ago

@odex21, @JohnRSim updated doc.

Yiidiir commented 11 months ago

@revolist @m2a2x Is there a way to export and keep the styling applied to the cells?