Quasar: DataTable - exporting to CSV, excel, ... feature

Created on 12 Dec 2016  路  5Comments  路  Source: quasarframework/quasar

feature request

Most helpful comment

IMO this is better to leave up to server-side, perhaps just adding a UI button to trigger the request.

Also note in my experience for one data table UI I often need to export multiple different grids. E.g. one might be parent rows only and another might be one-row-per-child with some parent columns duplicated, etc..

All 5 comments

IMO this is better to leave up to server-side, perhaps just adding a UI button to trigger the request.

Also note in my experience for one data table UI I often need to export multiple different grids. E.g. one might be parent rows only and another might be one-row-per-child with some parent columns duplicated, etc..

+1 for export

@colinmollenhour I'm totally agree with you.

If we look at the Datatable.js, a lot of transfer time is consumed because of the csv, pdf, ... export plugins. So it's better to leave up the server do the conversion and call the route on a top-bar button of the QTable.

This will be left to an external Quasar plugin. There's going to be such a plugin system for v1.0 (after v0.15) that will allow the community to make their own Quasar plugins. Stay tuned.

Most of existing plugin I tried like tableexport use the whole table to produce the xls(x) file. I tried them with the quasar QTable v0.15 but it does not work as expected. The QTable only draw the computedRows property that is holding the rows only for the current page instead of all rows. Same problem as https://github.com/quasarframework/quasar/issues/1194

Looking at the jquery.datatable, even if we are looking the page 1/50, the exported files contains the rows of all pages.

I think we will have to create a quasar plugin from scratch without help of third party library. Also the plugin will need access to the QTable internal array of ALL rows, filter method and order columns.

PS : Do we want the exported file to keep the same row order and row filter as we see ?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

danikane picture danikane  路  3Comments

jean-moldovan picture jean-moldovan  路  3Comments

green-mike picture green-mike  路  3Comments

lukadriel7 picture lukadriel7  路  3Comments

slowaways picture slowaways  路  3Comments