ADF Hidden Gem – Export Collection Listener by Andrejus Baranovskis

Posted: October 3, 2016 in JDeveloper & ADF
Tags: , , , , , ,
image

How many times you complained about ADF export collection listener generated output? There are two options for the output – CSV and excelHTML. Both of them are not really Excel friendly (Excel complains, each time when such file is opened) and produced output lacks formatting. Luckily there is a way to specify custom formatter for ADF export collection listener and set your own output type. In this way we can produce better and customized output file for Excel, you can construct Excel document with different formatting and layout.
Demo application with custom formatter for ADF export collection listener is available on GitHub repository – rs-export-xls. This was implemented by Red Samurai Consulting colleague – Fedor Zymarev. You are free to check-out the source code – use it in your projects and add new formatting features.  It would be great, if you could contribute to the community and commit any improvements – simply request merge approval into master on GitHub repository.
Demo runs with the entry page, which contains ADF UI table with Export all/selected rows options:

This is how Excel output looks like. There is a placeholder for worksheet title, header is highlighted and format is recognized by Excel:

You only need to set custom type (RSExcelExport) for ADF export collection listener, instead selecting excelHTML available by default: Read the complete article here.

WebLogic Partner Community

For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn Forum Wiki

Advertisements

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