Skip navigation elements to page contents
Wersja polskaEnglish version
Author
Jakub Pawlowski
OTN Forum nick:
KUBA
Related blogs
Steve Muench
Duncan Mills
Frank Nimphius (Old)
Grant Ronald
Shay Shmeltzer
Ric Smith
Didier Laurent
JHeadstart Team
AMIS
Chris Schalk
IT-Eye
LogicaCMG
DominionSpy
Andrejus Baranovskis
Gerger Consulting
Shay Van Keirsbilck
Radovan Kobularcik
Frank Nimphius (New)
John Stegeman
Branislav Nemec
Matthias Wessendorf
Chris Muir
Matthew Wilson


How to export data from ADF application to MS Excel file using Apache POI library (lost example)


Over year ago Frank Nimphius published on his old blog (and bring me to provide own) my example about exporting data from ADF to Excel file using Apache POI library.


Because of now Frank's old blog is unavailable, I resolve to publish this example (with some improvements) one more time. All you need to use it, is copy XLSCreator.java class and poi-[version].jar to your project.

Simple solution:

You need to define in constructor name of iterator with data. Also, you have to add custom property Excel = yes (using property inspector) to View Object attributes, you want to be exported.

 

Advanced solution:

You don't need any custom properties. In constructor you must define:

1) iterator name 

2) list of attributes to export ( java.util.List<String> )

3) display headers or not (boolean value)

4) Output file name

Download JDeveloper(10.1.3.3) workspace. Contains all required libraries.



Created:    07/04/2008

Copyright 2007