Friday, November 18, 2011

How to download Oracle ADF tables in Excel format



          At a single web application there are several ADF tables which presents different data. Using the web front end we can read and refer those data. But if we have the ability to download those data in Excel format then it would be very easy to process those data and make some decisions.

         It is very easy to convert ADF tables to Excel format using the "exportCollectionActionListener" component. Let's see a very simple example.

  1. Create an ADF table using a VO (View Object)
  2. Then create a command button (or a command link) next to the ADF table. I name it as “Download Excel".
  3. After that drag and drop an “exportCollectionActionListener” component from component pallet on to that command button. Then set parameters as follows.

    • ExportedId: table or collection id you want to download.
    • Type: excelHTML (because we want to download an excel file)
    • filename: Name on the download file.
    • title: title of the download file.

    No comments:

    Post a Comment