Excel Export and List Navigation Widget

Excel Export and List Navigation Widget

  
Hello,

I'm trying to export a full record list to Excel. The record list has the List Navigation widget tied to it, which limits the user's view to 100 items at a time. When I export, only the 100 items currently viewed are included in the exported Excel spreadsheet.

Is there a way to make the export action bring all 500+ line items into Excel at once without eliminating the pagination on the record list?

Thanks,

Theresa
Theresa -

Use the RecordListToExcel command on the data source for the on-screen table/list, not the table/list itself.

J.Ja
Hi Theresa,

Just adding on Justin's comment...
Usually the data source for the Table Records is the output of a Simple Query. The OutSystems Platform optimizes this element to return only the collumns used and the rows needed to render the screen.
In order to keep most of these optimizations and to prevent adding a lot of information in the viewstate you should refresh the query in the preparation and set the max records to a high number to get all the records (those 500+) to export.

Cheers

Is this suggestion to refresh the query still the case for OutSystems 9 and 10?

I'm using 9 and I don't have a lot of data to test with, but an aggregate tied to a Table Records on the screen seems to export all records (thousands) when the Record List To Excel uses the same GetEntity.List source, with or without a Refresh Data call, even though on the screen the associated Table is limited to displaying 50 lines.

If Refresh Data is still recommended, is setting the Max Records necessary? The 9.0 and 10.0 documentation for a Refresh Data max records says that the unset value means unlimited when exporting to Excel.


Use the action Record List To Excel to generate an Excel worksheet that the user can download.

192.168.1.1

Hi

Jacob Anawalt wrote:

Is this suggestion to refresh the query still the case for OutSystems 9 and 10?

I'm using 9 and I don't have a lot of data to test with, but an aggregate tied to a Table Records on the screen seems to export all records (thousands) when the Record List To Excel uses the same GetEntity.List source, with or without a Refresh Data call, even though on the screen the associated Table is limited to displaying 50 lines.

What André was warning against is that since you're using the Preparation's Aggregate data in a Screen Action to generate the Excel file, the platform will store the full list in the ViewState, increasing it's size by a lot unnecessarily. His suggestion to refresh the Aggregate on your Screen Action prior using the Record List to Excel tool means that the platform can keep the View State smaller (and, as a consequence, the network time much shorter for a large list).

Hi Jorge,

So by putting the Refresh Data into the Export action, it can optimize and not select all records in preparation for the view and then select all records on the refresh for export? I'll use Refresh Data in my exports then.

Can I ignore the Max Data setting on the Refresh Data call since the default, at least in the 9 and 10 docs, is all records for Excel output? That seems to be working but I don't know what the best practice is. I'd rather leave it unset than guess what the max records should be when I think we always want all to export.

Hi Jacob

Can I ignore the Max Data setting on the Refresh Data call since the default, at least in the 9 and 10 docs, is all records for Excel output? That seems to be working but I don't know what the best practice is. I'd rather leave it unset than guess what the max records should be when I think we always want all to export.

I typically let the platform handle that and leave the Max. Records setting empty both on the Aggregates and Refresh Data tools to begin with...