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.
|