> For the complete documentation index, see [llms.txt](https://docs.avonnicomponents.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.avonnicomponents.com/flow/tutorials/components/data-table/setting-up-data-export.md).

# Setting Up Data Export

## Introduction

This page is designed to help you create an "Export to" interaction for your Avonni Data Table, enabling users to export entire data sets or selected data rows in Excel or CSV file formats. Following the steps outlined in this tutorial, you can implement this powerful feature, enhancing your application's user experience and functionality.

{% hint style="info" %}

#### Built-in data export

Data export is one of many built-in features of the [Avonni Data Table for Salesforce](https://www.avonni.app/components/data-table), available in Screen Flows, on Lightning pages and in Experience Cloud.
{% endhint %}

{% embed url="<https://www.youtube.com/watch?t=2s&v=znSimsXDYEs>" %}

## Steps to Create an "Export to" Interaction

### 1. Create an action on the Data Table

Choose whether to [create a row action](/flow/tutorials/components/data-table/creating-row-actions.md) or an action, depending on your preference and specific use case.

### 2. Create the interaction from the interaction panel:

<figure><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2Fgit-blob-e3be5fba7e756cf29842639dd80bfacc726f111e%2F2023-04-26_20-53-22.png?alt=media" alt=""><figcaption></figcaption></figure>

* **Go to the Interaction Panel**: Look for the interaction options.
* **Choose Target**: Select the action you created in Step 1 from the dropdown list.
* **Set Type to 'Export To'**: This enables the data export feature.
* **Default File Name**: Enter a pre-filled name for the exported file, which users can change later. Select "**Mapped**" from the icon menu for dynamic file naming and choose one of your flow resources. This allows the file name to be generated dynamically based on your selected resource.
* **Optional - Simplify Export**: To speed things up, you can hide the export dialog, limiting user choices on file format and encoding.
* **File Format**: Pick the formats, like Excel or CSV, available for export.
* **Default Encoding**: Choose a standard encoding to ensure the file works well with most software.
* **Export All Data**: Turn it on to export all the data, up to a limit of 50,000 records.

## Wrap-Up

Following this straightforward guide, you've added an "Export to" feature to your Avonni Data Table. This enhances usability by enabling users to easily export data for analysis, sharing, or archiving beyond the confines of your application.<br>


---

# 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.avonnicomponents.com/flow/tutorials/components/data-table/setting-up-data-export.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.
