# Grid - Advanced Export

## Overview

GridMate provides advanced export configuration designed for precision, efficiency, and control. With Export Templates, Predefined 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"
        }
    }
]
```

## 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>" %}
