15
Views
5
Comments
Solved
Export to excel without pagination
Application Type
Reactive

Hi everyone!

I have a screen that displays a table based on an aggregate. It includes many filters, a search function, and pagination. I need to add a button to this screen that allows users to export the aggregate results - with all applied filters and search - but without pagination (i.e., export all matching records). What’s the best way to implement this?

My second question is: how can I customize the column names and the order of columns while exporting to Excel? Do I need to use one of the Forge components for that?

I use ODC

2016-04-22 00-29-45
Nuno Reis
 
MVP
Solution

Hello.

You must go server side to run the RecordListToExcel. And sending the list from screen to the server is a waste of bandwidth. The easiest way to export all is to run the same aggregate server-side without max records and return it as a binary.

To customize columns you just need to create a structure with those column names and sequence, and map the Aggregate to it. Easy and no extras. If you need a more complex excel (with styles, images, and so on) then you need components.

UserImage.jpg
Łukasz Kaproń

Thank you for your response!

I have one more question: what if users should be able to select which columns they want to export to Excel and in what order?

2026-03-12 06-20-48
KUNDAN CHAUHAN
Champion

You can pass the selected columns and order to the server, then build the Excel dynamically based on that. Loop through the data and add only the chosen columns in the right order before exporting 

Hope it help you.


2016-04-22 00-29-45
Nuno Reis
 
MVP
2017-07-15 18-41-36
Sachin Mahawar

Hi

You can create a copy of the same aggregate to use in the Export button logic, pass the same search parameters as input, and remove the Max Records property.

To customize the column names and order, you’ll need to implement some custom logic. I'm not aware of a specific Forge component for this, but if I come across one, I’ll share it here.

Thanks,

Sachin

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.