#Table - how to download entire table as xls

1 messages · Page 1 of 1 (latest)

languid smelt
#

In a paginated table how can we download an xls file of the entire table, even if there's server-side pagination. I know I have to query the whole data. But how can we download a file with that data?
Using a sql query and download() function I get a file full of json... not a data table.
Thanks.

maiden mantleBOT
#

Hi There!
Thanks for reaching out to us. One of our engineer will be with you shortly.

If you are stuck with an issue/error, please help us with following information.

  1. Which version of Appsmith are you on?
  2. Provide screenshots/screen recordings of the original error/code snippet.
  3. Add details about your use case and provide steps to reproduce the issue, if
    possible.
pulsar dagger
#

although it is csv and not xls file

languid smelt
#

@pulsar dagger yes it does. Thanks. But... it garbles non ascii characters... I can't seem to find a way to respect the encoding...

#

Also I suspeect this approach will quickly crash the browser when it's a big table...

languid smelt
#

I think I have to give up on using appsmith to download the entire table... may have to use a backend api...

languid smelt
#

so, to wrap up... it seems appsmith correctly downloads the file with the same encoding as the origin database. So there is really no problem. It is just a shame that we cannot download as xls. Downloading as csv will force the user to use the import text/csv in excel, that many folks don't know about. So maybe it would be good to have a function in appsmith that does the same as the download button in the table widget?

maiden mantleBOT
pulsar dagger
#

@languid smelt csv can be opened as a regular file in Excel right? I mean with individual columns and all. I know sometimes csv files can all end up in a single column separated by semicolons. But when I downloaded the csv file from the sample it opens up as it would normally. So I'm thinking why would users have to import the file as text/csv in excel

languid smelt
#

There are 2 issues with csv at this time that I can see: 1) opening in excel does not recognize the encoding - you have to use the import procedure in the Data menu->Get data from file; 2) tables that are paginated server-side are usually big, so the browser has to process all that data into the correct format before downloading - this can take too much cpu and ram, and you still need to instruct the user on how to open the resulting file.

#

Since appsmith already has the capability of producing and excel file from a query/api (that we see in the table download button) it would be a matter of making this available to us to use in other places (eg button).

pulsar dagger
#

We are looking at being able to provide infinite scrolling on the table widget but I'm not yet sure if the Download button will also then give us the entire table data. https://github.com/appsmithorg/appsmith/issues/13180
Have posted a comment here to confirm

GitHub

Objective Improve pagination in table to support the following Give devs a clear option to choose scrolling or pagination Expose methods for cursor based pagination Extend this to infinite scroll G...

maiden mantleBOT
#

Can you tell us more about why you need so much data at once?

languid smelt
#

hey, bc the user will use the file for further analysis when something is off, eg in excel

#

so the app shows the data paginated, with a few charts, metrics, etc.

#

if there's something to investigate further the user requires the full file