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.
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.
First, we will adapt the report and then we will put a link on the report.