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

# Grid - Advanced Export

## Overview

GridMate provides advanced export configuration designed for precision, efficiency, and control. With Export Templates, Predefined Export, Formatted Excel, Scheduled Export and Date Formatting, you can ensure every export is tailored to your needs removing unnecessary data, enforcing consistency, and significantly reducing manual overhead.

## Export Template

**Export Template** allows you to specify which columns to export from your grids. Create a template to export only the necessary columns, avoiding unwanted data and manual cleaning.

Below is a step-by-step tutorial to help you configure your **Export Template** and use it effectively👇.

{% embed url="<https://youtu.be/0N1vffuXOqw>" %}

```json
{
    "columns": [
        "Id",
        "Name",
        "CloseDate",
        "StageName"
    ]
}
```

## Predefined Export

The **Predefined Export** feature lets you preset export options like file format, record IDs, filters, template, and file name. This saves time and reduces errors.

Below is a step-by-step tutorial to help you configure your **Predefined Export** and save time during the export process👇.

{% embed url="<https://youtu.be/chb9QwTA40U>" %}

Below is an example of the **Predefined Export**.

```coffeescript
[
    {
        "name": "gmpkg_export",
        "label": "Export",
        "global": true,
        "component": "gmpkg:DataGridExportComponent",
        "attributes": {
            "format": "xls",
            "withoutRecordId": true,
            "autoSelectTemplate": true,
            "filename": "File Name"
        }
    }
]
```

## Formatted Excel

The **Formatted Excel** format exports the grid as a styled workbook. Cell coloring follows the grid's **Marker Coloring** rules, and the grid's **Group By** and **Aggregate** configuration is reproduced in the sheet:

* A shaded, bold header row per value of the first **Group By** field, showing the value and the record count, e.g. `Prospecting(12)`, followed by the records of that group.
* A bold white-on-blue **Total** row at the bottom with the aggregated values.

Select **Formatted Excel** in the Export dialog, or preset it in a **Predefined Export**:

```json
"format": "formatted-xls"
```

## Date and Datetime Formatting

### Date Formatting

GridMate enables customizable export date formats, allowing users to define their own formats when exporting grid data. This flexibility helps teams align exports with reporting requirements or regional preferences.

#### Date Format Setup

1. Go to **Setup** by clicking the **gear** icon.
2. Search for and open **Custom Settings**.
3. **Manage** **Data Grid Settings**, then click **Edit**.
4. Scroll to the **Export** **Date Format** section.
5. Enter a **custom format** like `YYYY-MM-DD` or set **`$Locale.dateFormat`**.
6. Click **Save** to apply the changes.

{% hint style="info" %}
`$Locale.dateFormat` uses the **user's default date format settings** to display dates during export.
{% endhint %}

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FKTacoZNN1hpuYIJUgxgU%2FScreenshot%202025-09-24%20at%2016.10.37.png?alt=media&#x26;token=7885b998-05d2-4cd4-8cd2-db88ca645de3" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
The configuration for date formatting is identical to that of datetime formatting. Refer to the [demo below](#datetime-format-demo).
{% endhint %}

### Datetime Formatting

GridMate provides **Export Datetime Format** customization, allowing users to define custom date-time formats for export grid data. This gives teams flexibility to match exports with reporting standards or regional preferences.

#### Datetime Format Setup

1. Go to **Setup** by clicking the gear icon.
2. Search for and open **Custom Settings**.
3. **Manage** **Data Grid Settings**, then click **Edit**.
4. Scroll to the **Export** **DateTime Format** section.
5. Enter a **custom format** like `YYYY-MM-DD HH:MM:SS` or set **`$Locale.datetimeFormat`**.
6. Click **Save** to apply the changes.

{% hint style="info" %}
`$Locale.datetimeFormat` uses the **user's default date format settings** to display dates during export.
{% endhint %}

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FATcDX6dTaN9f6FiBKvQv%2FScreenshot%202025-08-04%20at%2010.10.51.png?alt=media&#x26;token=2a3f65b2-a0f2-4b76-a4ee-eab4971f529d" alt=""><figcaption></figcaption></figure>

#### Datetime Format Demo

Below is a step by step tutorial how to set and configure the **Datetime Format** for the export.

{% embed url="<https://youtu.be/QXs6xwU8NZU>" %}

## Scheduled Export

**Scheduled Export** sends a grid's data by email automatically: daily, weekly or monthly, as a CSV, Excel or Formatted Excel file. Set it up once and your team receives the latest data on schedule, without exporting by hand.

Each export always reflects the grid's **current configuration**, columns, filters and sort included, so your file stays up to date even when the grid changes.

{% hint style="info" %}
Assign the **GridMate Advanced User** permission set to every user who will schedule exports.
{% endhint %}

### Create the Grid Action

1. Go to **Setup** by clicking the **gear** icon.
2. Search for and open **Custom Metadata Types**.
3. Click **Manage Records** next to **Grid Action**, then click **New**.
4. Set the **Label** to `Schedule Export`. The **Grid Action Name** fills in automatically.
5. Leave **Sobject** empty, so the action is available on every object.
6. In **Metadata**, paste the action definition below.
7. Click **Save**.

```json
{
    "component": "gmpkg:DataGridCallLWCComponent",
    "global": true,
    "icon": "utility:date_time",
    "modalSize": "medium",
    "attributes": {
        "componentDefs": [
            {
                "component": "gmpkg:userGridScheduleExportLWC",
                "attributes": {}
            }
        ]
    }
}
```

{% hint style="info" %}
The **Label** gives the button its name, and the **Metadata** gives it its behavior: open the Schedule Export window, available at any time (no records need to be selected), with a clock icon and a medium-sized window.
{% endhint %}

### Add the action to a User Grid

1. Open the **User Grid** you want to schedule.
2. Click **Config. Wiz**.
3. Open the **Actions** tab.
4. Under **Available**, select **Schedule Export** and move it to **Selected**.
5. Click **Save**.

The **Schedule Export** button now appears in the grid toolbar.

### Schedule an export

1. Click **Schedule Export** in the grid toolbar.
2. Under **Select a format**, choose **Comma Delimited .csv**, **Excel File** or **Formatted Excel File**.
3. Enter a **File Name**. It defaults to `<Grid label>_export`.
4. Under **Frequency**, choose **Daily**, **Weekly** or **Monthly**.
5. Set the **Hour of Day**. For a weekly export, also set the **Day of Week**; for a monthly export, the **Day of Month** (1 to 28).
6. In **Recipients**, enter one or more email addresses, separated by semicolons.
7. Click **Submit**.

{% hint style="info" %}
The export runs at the start of the selected hour, in **your** timezone.
{% endhint %}

### Manage your scheduled exports

Click **Schedule Export** again to see the **My Scheduled Exports** table. It lists your schedules for this grid, with their frequency, last run, status, and whether they are active.

From the row menu, you can:

* **Deactivate** a schedule to pause it, then **Activate** it again at any time.
* **Delete** a schedule permanently.

{% hint style="info" %}
The table appears once you have created at least one schedule. Each user only sees their own schedules.
{% endhint %}

### Schedule Export Demo

Below is a step-by-step tutorial to help you configure and use **Scheduled Export**👇.

{% embed url="<https://youtu.be/ZrmjbVSJ79A>" %}
