# Export

If you are exporting data using a table component, you will be provided two options as data sources. `This Component` and `Set Data Source.` &#x20;

<div align="left"><figure><img src="https://3448227606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LQ08RFAKZvFADEiXKFy%2Fuploads%2FWF8YbBul201pbWcOQ93q%2Fimage.png?alt=media&#x26;token=e578681d-21d8-4f84-8ecd-167368b18d50" alt=""><figcaption></figcaption></figure></div>

### This Component

This option allows you to export the current data shown on the table. You will also be able to sort the data based on a specific column. Choose the columns to include, and set the number of records to export.

### Set Data Source

This option provides three options:

* **Load Data:** Load data from a connected data source.
* **Load Using Workflow:** Load data resulting from a workflow.
* **Specify Data**: Load data from another component, page query, or a variable.

You will also be able to sort the data based on a specific column. Choose the columns to include, set the number of records to export, and set filters.

<div align="left" data-full-width="false"><figure><img src="https://3448227606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LQ08RFAKZvFADEiXKFy%2Fuploads%2FPeeskiGZo1clLCI2oAh4%2Fimage.png?alt=media&#x26;token=a9b134e2-c1df-4d2c-b0d2-8dfc769594e5" alt=""><figcaption></figcaption></figure></div>

### Sorting

This feature allows you to sort the records by a specific column when exporting to a file. To disable sorting, choose `Not Specified` as a sorting option.

<div align="left"><figure><img src="https://3448227606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LQ08RFAKZvFADEiXKFy%2Fuploads%2FbqQS29HNJLmyRagiu9mU%2Fimage.png?alt=media&#x26;token=5e73a71b-f9ad-4f81-a5f5-5ad4b8f8dba5" alt=""><figcaption></figcaption></figure></div>

{% hint style="info" %}
Make sure sorting is stable or you can get duplicated/missing result rows.
{% endhint %}

### Export selected row

First, you need to add an export action to the table for exporting selected rows. To do it, follow the steps:

1. Drag-and-drop a  `Table` to your page
2. Go to the **Actions** Tab
3. Click on the `Row Checked` button
4. Click on the **New Action**
5. From the dropdown menu, choose `Export Data`
6. Click on the **Choose Resource**&#x20;
7. Click on the `Add` button to apply a filter
8. To apply a filter, choose **ID equals**
9. Choose the **formula** for the filter

{% @arcade/embed flowId="w0F7I6K8zq7QHO3VMbdZ" url="<https://app.arcade.software/share/w0F7I6K8zq7QHO3VMbdZ>" %}

### Now, let's test it

1. Click on the **rows** you want to export
2. Click on the `New Action` button
3. Click on the `Execute` button
4. Choose the **format** of the file
5. Choose **CSV** for exporting the file as CSV
6. Click on the `Export` button

{% @arcade/embed flowId="XFq70hOR2pcQlbWWo7bE" url="<https://app.arcade.software/share/XFq70hOR2pcQlbWWo7bE>" %}

### Rename the button

1. Click on the **Text** field&#x20;
2. Rename the button

{% @arcade/embed flowId="EnAeqhkbd47OhGt2rEDb" url="<https://app.arcade.software/share/EnAeqhkbd47OhGt2rEDb>" %}
