# Export Data

> Export contacts, companies, deals, activities and products as CSV, XLS or XLSX from Advanzo CRM, with the current filter applied.

With the export feature of Advanzo CRM you export your data
 in **CSV, XLS or XLSX** format, for example for data analysis,
 reporting or migration. For technical reasons, however, not all [resources](https://www.advanzo.ch/docs/sections/basics) can be exported. The following
 resources support the export feature:

- **Deals**
- **Contacts**
- **Companies**
- **Products**
- **Activities**

You can access the export feature on the index page of each supported resource,
 for instance, on the contacts table.

## Performing an Export

1. **Open the export.** In the list view, click the three-dot menu at the top right and select Export.
2. **Choose format and period.** The file type is CSV, XLS or XLSX. The date range limits the records by creation date.
3. **Export.** Export all fields or select the columns you need, then click Export. You only get records you are allowed to see.

Follow these steps to export data from a resource:

1. Go to the **list view** of the resource.
2. Click the **ellipsis** button at the top right
   corner.
3. Select **Export** from the dropdown menu.
4. In the modal, choose the **file format** for the export.
5. Optionally, select a date range based on the **creation date**
   to filter the records to be exported.

> **Info:** Non-admin users with the export
>  permission can only export records they are able to view. The export feature
>  respects access control, so users cannot export records they are not
>  authorised to see.

On the export modal

- Choose the **Type**: CSV, XLS, or XLSX.
- Pick a **Date range**: Today, Last 7 Days, This Month, Last Month, All, or Custom (with a start and end date).
- Select **All Fields** or **Select Fields** to choose specific columns.
- Click **Export**.

### Granting Export Permissions

By default, **non-admin users cannot use the export
 feature**. To allow a user to export:

1. Create a [role](https://www.advanzo.ch/docs/sections/users#roles) with the necessary export
   permissions.
2. Assign this role to the user, who can then export the
   specified resources.

On the role's permissions

Under each resource's permissions (e.g. Activities), set the **Export** permission to **Granted**.

### Exporting Records by Specific Criteria

Sometimes you need to export data that matches specific criteria, for
 example all contacts created within a month. To do this,
 apply filters to the index view before you export.

1. **Navigate to the Resource List View:**

    - Go to the list view of the resource you want to export (e.g.,
       Contacts, Deals, etc.).
2. **Apply Filters:**

    - Click the filters dropdown and then click "New
       Filter".
    - Select the criteria for filtering. You can often filter data based
       on various fields like creation date, status, assigned user, etc.
    - Apply the filters to narrow the list down to the records that match
       your criteria.
3. **Initiate Export:**

    - Click the **ellipsis** button at the top
       right corner.
    - Select **Export** from the dropdown menu.
    - In the export modal, tick the **"Export records based on
       the applied filters"** checkbox. This ensures that only
       the filtered records will be included in the export.

### Customising Export Fields

By default, Advanzo CRM exports all fields of a resource. To customise the
 exported data:

1. **Open Export Modal**: Click the **Select
   Fields** option in the export modal.
2. **Select Fields**: Tick the checkboxes next to the fields you
   wish to include in your export file.

This way the export file contains only the data you need.

### Choosing the Export Date Range Field

When you export records, the default date field used for filtering
 is the **"Created At"** date. You can
 choose a different date field, depending on the type of data you are
 exporting. This includes any custom field of type
 **"Date"** or **"DateTime"**.

**How to Select a Different Date Range Field:**

- Look for the dropdown menu next to the **"Date
   Range"** label.
- Select your preferred date field from this dropdown.

**Usage Example:**

- Suppose you want to export records based on a custom "Birthday"
   field. You can set the date range to include all records where the birthday
   falls within the current month.

Technically, this feature runs a MySQL 'between' query, so that you can
 export records based on specific date criteria.
