2328
Views
7
Comments
Solved
How to Export Record List to Excel in Reactive Web App?

I am populating a table with data, and needing to allow a user to click a button and export that data to excel through the download action. I am familiar with this process on Traditional Web apps but not in the new Reactive apps.

2018-12-09 19-13-19
Tiago Gomes
Solution

Hello Eric,

Create a server action and use the RecordListToExcel, then define an output parameter as binary.

Then just drag that Action to the client action, use the download widget and use the binary output parameter defined on the server action.


Hope it helps,

Cheers!

UserImage.jpg
Paul Davies

Tiago Gomes wrote:

Hello Eric,

Create a server action and use the RecordListToExcel, then define an output parameter as binary.

Then just drag that Action to the client action, use the download widget and use the binary output parameter defined on the server action.


Hope it helps,

Cheers!

Don't you still need an input parameter for the server action to send to the RecordListtoExcel though if your aggregate lives on the screen?


UserImage.jpg
Arokia Nathan Antoni Samy

Tiago Gomes wrote:

Hello Eric,

Create a server action and use the RecordListToExcel, then define an output parameter as binary.

Then just drag that Action to the client action, use the download widget and use the binary output parameter defined on the server action.


Hope it helps,

Cheers!

 

Hi Tiago,


Would you able to share the oml file for above mentioned example? I am having difficulty in exporting the aggregate.


Regards

Arokianathan

UserImage.jpg
Ricardo Cotilho

Also have the same question!

What if we need to pass our RecordListToExcel to the Server Action, when it's a composite aggregate/specific list (i.e., not in the database)???

UserImage.jpg
David Roque

Thank you. Everything works, except I download an empty file. The Aggregate returns lots of data (I tested), but the downloaded file always cames empty. What am I doing wrong?

2025-07-23 14-20-18
Cláudia Capitão
Champion

Hi Arokia,

The aggregate data is fetched asynchronously, so you need to check if you already have data or not before allow the user to execute your screen Action1. Or you can call that action on the After Fetch event of the aggregate. If you not do this, you cannot have 100% sure that the data was fetched, before the download action is requested. 

Documentation: 

[1 - After Fetch] https://success.outsystems.com/Documentation/11/Developing_an_Application/Implement_Application_Logic/Screen_and_Block_Lifecycle_Events#on-after-fetch

[2 - Assync Data] 

https://success.outsystems.com/Documentation/11/Developing_an_Application/Use_Data/Query_Data/Implement_asynchronous_data_fetching_using_Aggregates

2022-10-18 07-32-49
Randall Jodache Chetty

Thanks for sharing


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