Pages

Sunday, November 4, 2007

Office integration with Jdeveloper 11g

In the presentation of Ted Farrell which he held in the netherlands he mentioned Microsoft Office as a gui to adf. This is very interesting because office integration in java is a bit difficult. You have apache poi where excel integration is possible but you have to do some programming.
In JDeveloper technical preview 2 there is a sneak preview where you can export data of a rich table to excel.
In the next versions of jdeveloper there will be more possible , somehow Oracle made a interface from adf to .net framework. the jars and dll's are already shipped in technical preview 2 ( see the directory adfdi of the jdeveloper root) .

Now a small example of exporting table data to excel

First we have a rich table on a table emp where I put a button commandbutton with the text export to excel see below

now we open the component palette and go to the operations accordion and drag the export collection action listener on the command button.

I only have to fill in a few parameters , the first exportedId is the id of the rich table then we select excelHTML . We are finished

We can now run the webapp and we can change the colums and the sorting of the table. The same data and presentation is copied to excel

5 comments:

  1. Hi edwin,

    Really we can save time with this ,
    but i am asking how can we integrate a personal css skin over an ADF project

    ReplyDelete
  2. here you http://www.oracle.com/technology/products/adf/adffaces/11/doc/skin-selectors.html

    put your css in public_html
    add the skin in trinidad-skins

    and select it in the trinidad-config

    ReplyDelete
  3. hi,
    I tried myne with the export collection but the result don't loks very nice the excell file is not regular how can i do to obtain a regular one

    ReplyDelete
  4. Ok what for export in excel do you want, maybe you can make a servlet where you can make your own csv and stream this to the client or use a servlet with apache poi.

    ReplyDelete
  5. It is a table to be displayed in Excell, but when i open the file the column are Disproportionate.
    How to do to let them regular

    ReplyDelete