How to export ADF Pivot Table into an excel file.

Home/ADF/How to export ADF Pivot Table into an excel file.

How to export ADF Pivot Table into an Excel file.

This section we explained how to export an ADF Pivot table into an excel sheet.The component dvt:exportPivotTableData helps to export the table into an Excel file, and it requires an ID attribute which is the id of PivotTable and type attribute which is excelHTML.  Also, the exportPivotTableData requires an action component button or link to bind. 

I have used a custom Sales tables in this example. To download the DDL  sales.sql 

ADF Pivot Table Excel export

1. Here we are creating Pivot table by dropping Sales VO into the JSF page. Move attributes from Available Attributes to Row and Column edges

122416_1909_Howtoexport1 How to export ADF Pivot Table into an excel file.

 

2. Now the Pivot Table render into the JSF page, and it has an id attribute.

122416_1909_Howtoexport2 How to export ADF Pivot Table into an excel file.

 

 

3. Create a Button component by dropping a button component into the JSF page

122416_1909_Howtoexport3 How to export ADF Pivot Table into an excel file.

 

 

4. Now drop exportPivotTableData inside the button component. Enter the id of the PivotTable in ExportedId,  and excelHTML in Type 

 

122416_1909_Howtoexport4 How to export ADF Pivot Table into an excel file.

 

 

5. Now add filename, exportedData and title attributes in the <dvt:exportPivotTableData> component as shown below 
Note: if you set exportedData=” selected” then only the selected Pivot table will be exported into an excel file.
 

 

6. Click on the button to download excel sheet

 

1-1 How to export ADF Pivot Table into an excel file.

 

pgn How to export ADF Pivot Table into an excel file.

Govind

Thank you for visiting my personal blog. Myself Govindan, Software Developer by profession since 2006 and hence I started this blog early in 2016 and ever since I've been writing about technologies experienced and learnings of everyday life.

The views expressed on this blog are my personal views and do not necessarily reflect the views of my employer.

Please feeling free to reach me on any comments and feedbacks you have. Would be more than glad to listen and reply 🙂
pgn How to export ADF Pivot Table into an excel file.
By | 2016-12-24T14:53:57+00:00 December 24th, 2016|Categories: ADF|Tags: , , , , |3 Comments
  • Devlin Blade

    Hi Govind, I am trying to export the pivot table to excel and want the first two column headers as part of the report, but I can’t render them in the report. Can you please help on how can they be made part of the excel report?

    Thanks.

    • Govindan Padmanaban

      Hi Devlin, We can display the column header names for hierarchical columns by setting the below property but it display the header names only on the JSF page.

      dvt:pivotTable layerLabelMode=”rendered”

      I’m not sure now how to display this column names in excel sheet.I’m Sorry, I’m unable to help you on this question.

      • Devlin Blade

        Thanks Govindan. Keep up the good work!

Like us on Facebook.
Connect!