> For the complete documentation index, see [llms.txt](https://docs.appfarm.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.appfarm.io/library/action-nodes/export-data.md).

# Export data

The action node **Export Data** is used to export data from a *Data Source* to a *CSV* or *Excel (.xlsx)* file. It is available in apps.

The action node supports exporting data from a Data Source row by row, as well as aggregation of data (e.g. export the number of sales per department).

{% hint style="info" %}
Showroom: [Export Data example](https://showroom.appfarm.app/action-nodes/exportdata), with its setup in Appfarm Create ([register](https://showroom.appfarm.app/sign-up) for access).
{% endhint %}

## Settings

### File Name

Set a name for the exported file. The file type follows the **Format** setting.

### Format

The file format: `CSV` (default) or `Excel (.xlsx)`.

### Delimiter

*CSV only.* Specify which *delimiter* to use in the file, i.e. the character that marks the end of the data. The default value is a comma (`,`), but you can set whatever you want (e.g. `;`).

### Wrap Strings In Quotes

*CSV only.* If you want to *wrap strings in quotes* (e.g. `"some text"`).

### Exclude Column Headers

Export the data without including column headers.

### Data **Source**

Select the *Data Source* you want to export data from. You can limit the export with a selection or a filter on the data source.

### Selection

*Shown when a Data Source is selected.* Pick which objects to export: `All objects` (default), `Selected object(s)`, `Object in context` or `Filtered selection`.

### Filter

*Shown when Selection is Filtered selection.* Define the [filter](https://docs.appfarm.io/reference/platform-concepts/filters.md) that picks the objects to export.

### **Row grouping**

If you want to group the data on a row basis, select a *Row grouping property*. If you do not select a row grouping each data object in the Data Source will result in a row in the exported file.

Button **Add all columns** will add all the Object Class Properties (and runtime properties) of the selected Data Source as Static Columns. Reference properties will only be added if the refered Object Classes have a [Display Property](https://docs.appfarm.io/reference/data-model/object-classes.md#general-properties) set. *Example: Adding all columns for Data Source `Contacts` (having a reference `Contact.Company`) will add `Contact.Company.Name` as a columns if the Object Class `Company` has `Name` as Display Property.*

### **Static columns**

Set up the columns you want to display in the export. This can be columns with text or some sort of aggregated value. The aggregated values are set up by selecting a property with datatype *Float* or *Integer* and specifying an aggregation function. If you leave the column blank it will display the count of the objects in the row.

### Data Column

If you want to group data on a column basis and display one column per data property item, you can select a *Column Property* under *Data Column*.

**Column Data Source** is shown when the Column Property is a reference. Select a data source of the referenced object class to take the set of data columns from that data source instead of from the exported data. For example, pick a `Months` data source to get one column per month, also for months with no data.

### **Column Headers**

Define the information you want to display as header rows per data column. This is typically information about the Column Property.

### **Value Property**

Add a *Value Property* to display in the rows per column, and optionally select an aggregation function. If none is selected *Count* will be used.

The **Aggregation Function** can be `Count` (default), `Sum`, `Average`, `Median`, `Minimum` or `Maximum`.

### **Target**

The **Target Type** lets you choose between:

1. **Download Immediately** (default) downloads the file directly
2. **Add to file** lets you add the file to a *File Data Source*

With **Add to file**, these settings are shown:

| Property                    | Description                                                                                                                                                                                      |
| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Target**                  | The runtime-only data source of a file object class to add the file to.                                                                                                                          |
| **Replace Existing Object** | *Shown if the Target is a single-cardinality data source.* Replace the file already in the data source. If this is not selected and the data source already holds a file, the action node fails. |
| **Set Selected**            | *Shown if the Target is a many-cardinality data source.* Set the new file object as selected.                                                                                                    |
| **Values on Create**        | Set values for other properties on the new file object.                                                                                                                                          |

The file is added to the runtime-only data source. Run [Persist objects](https://docs.appfarm.io/library/action-nodes/persist-objects.md) to upload and save it.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.appfarm.io/library/action-nodes/export-data.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
