Category: Appsmith Support
Updated

This solution is summarized from an archived support forum post. This information may have changed. If you notice an error, please let us know in Discord.

Download option is not working properly if there is server side pagination implemented

Issue

I am facing an issue with server side pagination in my application where the download to excel/csv option only shows data from the current page instead of exporting all data from the table. Even server side search has the same issue. I am looking for a solution to overcome this problem.

Resolution

The issue with server-side pagination, where the download to excel/csv option and server-side search only works within the page scope, can be resolved by creating a custom download button. The solution involves extracting the table column names using the TableName.tableColumns field and using jquery to replace any commas in the csv output with a special character.

A sample app, Appsmith, provides a template for creating a custom download button, but it includes two Google Sheets which may not be necessary for all scenarios. For users dealing with large sets of data that are paginated, the custom button can enable downloading of all data by modifying the csv output to include all relevant data, not just what is visible on the current page.