In 11g, how to Export the ADF table data into Excel Spread sheet

First create a table which displays the data in the JSP page. Now drag and drop the CommandButton from the Common Components palette into the JSF page as shown below

<af:commandButton text=”Export to Excel” id=”cb4″>
</af:commandButton>
 

 Now add the below code to the commandButton tags –

<af:commandButton text=”Export to Excel” id=”cb4″>
                        <af:exportCollectionActionListener exportedId=”resId1
                                                           type=”excelHTML”
                                                           title=”Sample excel Document”
                                                           filename=”Sample.xls”/>
</af:commandButton>
 
 

resId1” is the ID attribute value for the ADF table.

Now all your rows from the ADF table will be exported into Excel spread sheet.

Advertisements
This entry was posted in ADF (Application Development Framework) and tagged , , , . Bookmark the permalink.

4 Responses to In 11g, how to Export the ADF table data into Excel Spread sheet

  1. Amar says:

    Thanks I could export my table now but i have few queries as below :
    Suppose I had a then also the coulmn will be exported into excel sheet ?
    Actually i looking for hidden fields too be exported along with output text. Is it possible ?

  2. ab says:

    You could use the Apache POI library to export any data into excel

  3. You actually make it seem so easy with your presentation but I find this matter to be actually something
    that I think I would never understand. It seems too complex and very broad for me.
    I am looking forward for your next post, I will try to get the hang of
    it!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s