Export Data Page (list) to Excel Sheet


Step-by-step guide for exporting a Data Page list to an Excel file using Platform 8.8.2:

  1. Generate a Data Page list.

  • In this illustration, a report definition is utilized as a source to query sample data inputted in the Data Type record. 


2. Create an Excel template file (see a sample attached)
  • Reference the data page name and pxResults() followed by a property name.

  • Notice that we can stye the Excel template file such as adding a color to the header.  Column D is also set with 'Wrap text'.

NoteIt seems that the Excel template does not support parameterized data pages. One potential solution is to utilize a Page-Copy step to copy data from the parameterized data page to a temporary activity page, which can then be employed in the Excel template. For example: {MySampleDataTypeListFiltered.pxResults().pxCreateDateTime}.

3. Upload the Excel template file as a binary file in Platform.

4. Create an activity with one step - Call pxGenerateExcelFile

  • Parameter 1 = Excel output file name
  • Parameter 2 = Excel template name ("excel!SampleDataTypeDataPage!xlsx")
  • Parameter 3 = Select DownloadFile checkbox

5. (Unit test) Run the activity to generate and download the Excel output file.



Attach Excel file to email

If you have a requirement to send this Excel file as an email attachment, this article demonstrates how to configure it step by step.


Happy Learning :) :)

Comments