> 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/dynamic-components/component-builder/interactions/export-to.md).

# Export To

The **Export To** interaction downloads Data Table or Pivot Table data to a local CSV or Excel file.

## Overview

The **Export To** interaction allows users to download information from your [**Data Table**](/dynamic-components/components/data-table.md) or [**Pivot Table**](/dynamic-components/components/pivot-table.md) components directly to their local device. This is essential for offline analysis, sharing data with external stakeholders, or generating snapshots for reporting.

An export can cover the full query result rather than only the rows on screen, up to 50,000 records in a single file.

### Key Features

* **Large Data Export**: Exports up to 50,000 records in a single file, not only the visible rows.
* **Full Dataset Extraction**: Choose between exporting only the rows currently visible on the screen or the entire result set returned by your query.
* **Flexible Formats**: Supports universal CSV and formatted Excel (.xlsx) files.
* **One-Click Experience**: Option to hide the export dialog for a streamlined, immediate download using predefined settings.

The export modal includes an **Export all data** toggle.

* **Active Toggle**: When enabled, the export bypasses pagination and visible row limits and includes every record returned by your query, up to 50,000 records.
* **Inactive Toggle**: When disabled, the export only includes the records currently visible in the component's current view or filtered state.

***

## Configuration

The **Export To** interaction is configured directly on your Data Table or Pivot Table component. Add it as an action on one of the component's interaction triggers — most often **Header Action Click**, and also **Row Action Click** for a per-row export. The following settings control how the export behaves.

#### Default File Name

The name that will be used for the downloaded file. This can be static text or dynamic, using resources.

**Example**: `Contact_Report_2024`.

#### Default Export View

Choose how the data should be formatted in the export:

* **Formatted Report**: Exports data with formatting preserved, similar to how it appears on screen. Better for presentation and readability.
* **Details Only**: Exports raw data values without formatting. Better for data analysis and manipulation in external tools.

#### Export All Data

Data Table only — the Pivot Table's Export To has no such setting, and always exports the table as it stands.

Without it, an export includes only the records currently displayed in the component's view. **Export All Data** allows users to:

* **Export Full Query Results**: Download every record returned by your query—<mark style="background-color:orange;">**up to 50,000 records**</mark>—in a single file.
* **Bypass Pagination**: Ignore UI limits and pagination to capture the entire dataset.
* **Maintain Performance**: Extract large volumes of data efficiently without hitting Salesforce "Too many query rows" governor limits.

<figure><img src="https://2532358799-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FODPvvv7Cx9Z9RECLn3oV%2Fuploads%2Fgit-blob-a02de36c945b64db338249fb1d3a4a1a98a432e6%2Fimage%20(8).avif?alt=media" alt=""><figcaption></figcaption></figure>

#### Available File Formats

Select which file formats users can choose from when exporting:

* **CSV**: Comma-separated values file. Universal format compatible with all spreadsheet applications. Best for simple data exports and maximum compatibility.
* **Excel**: Microsoft Excel format (.xlsx). Preserves formatting and supports multiple sheets. Best for complex reports that require formatting or for recipients who primarily use Excel.

You can enable one or both formats depending on your users' needs.

#### Default Encoding Type

Select the character encoding for the exported file. This ensures special characters and international text display correctly:

* **Unicode (UTF-8)**: Universal encoding supporting all languages and special characters. Recommended for most use cases (default).
* **Unicode (UTF-16)**: Alternative Unicode encoding. Use if required explicitly by downstream systems.
* **Unicode**: General Unicode encoding.
* **ISO-8859-1 (General US & Western Europe, ISO-LATIN-1)**: Latin alphabet encoding. Use for basic text without international characters.
* **Japanese (Windows)** (`windows-31J`) and **Japanese (Shift-JIS)**: for legacy Japanese systems.
* **Chinese National Standard (GB18030)**, **Chinese Simplified (GB2312)**, **Chinese Traditional (Big5)**, and **Big5 Traditional Chinese (HKSCS)**: for Chinese text.
* **Korean (EUC-KR)**: for Korean text.

<mark style="background-color:green;">**Tip**</mark>: When in doubt, choose UTF-8 for maximum compatibility.

#### Hide Export Dialog

Toggle this option to control whether users see an export options dialog:

* **Disabled (Dialog Shown)**: Users can choose format, encoding, and edit the file name before exporting. Provides maximum flexibility.
* **Enabled (Dialog Hidden)**: Export occurs immediately using the default settings. Provides a streamlined, one-click export experience.

**When to Hide the Dialog**: Enable this when you want a simple, quick export process, and your users don't need to choose between formats or change settings.

***

## Example

See practical examples and learn how to implement specific scenarios using this interaction:

{% content-ref url="/pages/rGcJxqxQHX99anoiW9iH" %}
[Enable Data Export](/dynamic-components/tutorials/components/data-table/enable-data-export.md)
{% endcontent-ref %}

***

## Important Considerations

* **Component Support**: The Export To interaction is exclusively available for the Data Table and Pivot Table components. On a Pivot Table it is offered on **Header Action Click** only, and without the **Export All Data** setting.
* **Export All Data Limits**: With the Export All Data feature, you can export up to 50,000 records in a single transaction. It is a Data Table setting only.
* **Filter Integrity**: All exports—including those using Export All Data—strictly respect any active filters applied to the component.
* **User Feedback**: For large datasets, it is recommended to configure a Show Toast interaction on the "On Success" event to notify users when the file is ready.
* **Formatting Constraints**: While the "Formatted Report" view preserves visual styles, complex formatting may vary between Excel and CSV formats.
* **Pivot Table Structure**: Data exported from a Pivot Table maintains its pivoted structure rather than reverting to a flat data format


---

# 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/dynamic-components/component-builder/interactions/export-to.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.
