Book Image

Oracle APEX Cookbook

Book Image

Oracle APEX Cookbook

Overview of this book

Table of Contents (21 chapters)
Oracle APEX Cookbook Second Edition
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Exporting to a comma-separated file


APEX offers a standard built-in to export data to a Comma-separated Value (CSV) file. A CSV file is readable by Microsoft Excel or OpenOffice Calc. Each row contains the data of a record in a table and each value in the row is separated by a comma and represents the value of a column of the table. When Export to CSV is enabled, a link is shown just below the region with the data. We will show you how to add this link.

Getting ready

You should have a working application with at least one standard report. If you don't have a report, create one. You can find a recipe for creating a simple report in Chapter 1, Creating a Basic APEX Application.

How to do it...

First, we will adapt the report and then we will put a link on the report.

  1. Go to the Report page.

  2. In the Regions section, click on the Report link.

  3. In the Report Export section, select Yes in the Enable CSV output listbox:

  4. In the Link Label text field, enter Export to csv. This text appears as a link below...