253 total views, 1 views today
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
2. Now the Pivot Table render into the JSF page, and it has an id attribute.
3. Create a Button component by dropping a button component into the JSF page
4. Now drop exportPivotTableData inside the button component. Enter the id of the PivotTable in ExportedId, and excelHTML in Type
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.
<af:button id="b1" text="Export Excel" >
<dvt:exportPivotTableData exportedId="pt1" type="excelHTML" exportedData="all" filename="all_xls.xls" title="All Data"/>
6. Click on the button to download excel sheet
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 🙂
Latest posts by Govind
- How to encode and decode base64Binary datatype in Oracle BPEL - December 11, 2017
- How to Read a File using Oracle BPEL File Adapter Example - December 11, 2017
- How to write a File using Oracle BPEL File Adapter Example - December 10, 2017