> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hightouch.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Microsoft Excel

> Sync warehouse data to Excel worksheets used by sales, ops, and marketing teams

## Supported syncing

| Type | Description | Supported Sync Modes |
| - | - | - |
| **Mirror** | Sync the full result set of the model to the selected destination worksheet | All |
| **Snapshot** | Create a new worksheet on every sync with the full result set of the model | All |

For more information about sync modes, refer to the [sync modes](https://docs.hightouch.com/syncs/types-and-modes.md#sync-modes) docs.

> [!NOTE]
>
> The order of rows and columns in synced spreadsheets may differ from how they appear in your model. This is expected behavior and applies to all sync modes. [Learn more about row and column ordering](https://docs.hightouch.com/models/creating-models.md#row-and-column-ordering).

## Connect to Microsoft Excel

Go to the [**Destinations** overview page](https://app.hightouch.com/destinations?from=docs) and click the **Add destination**
button. Select **Microsoft Excel** and click **Continue**. You can then authenticate Hightouch to Microsoft Excel by logging into your Microsoft Excel account. Once successful, you will be redirected back to Hightouch to enter a descriptive name for your destination and complete setup.

## Sync configuration

Once you've set up your Microsoft Excel destination and have a [model](https://docs.hightouch.com/getting-started/concepts.md#models) to pull
data from, you can set up your sync configuration to begin syncing data. Go to the [**Syncs** overview
page](https://app.hightouch.com/syncs?from=docs) and click the **Add sync** button to begin. Then, select the relevant model and
the Microsoft Excel destination you want to sync to.

### Sync mode

Your first configuration is the [sync mode](https://docs.hightouch.com/syncs/types-and-modes.md#sync-modes). You can select either:

* **Mirror**: if you want the full result set to overwrite a particular sheet's contents
* **Snapshot**: if you want to create a new sheet on every sync; the created worksheet's name is composed of the model name and sync run timestamp, for example, `Model Name: YYYY-MM-DD T hh mm ss`.

> [!WARNING]
>
> If you select **Mirror** mode, please ensure that your sheet doesn't contain
> data you don't want be overwritten.

### Drive and workbook selection

You can select any drives the user you authenticated with has access to. When selecting a workbook, you can either select the workbook from a dropdown or choose to enter a workbook ID. Once you've selected the workbook, its worksheets populate the next dropdown.

### Field mapping

You can choose to **sync all columns** or select only certain model columns to sync to your Excel worksheet. When syncing all columns, the column names in Excel mirror the column names in your source. When selecting specific columns, you can enter new columns names. If you'd like to rename columns, even if you want to sync all columns, you need to map each one individually.

### Custom cell range

By default, Hightouch inserts data in a worksheet starting at cell A1. The inserted data clears and updates the entire sheet. You can optionally select a range of cells to insert the data to. This capablity lets your preserve formulas or notes in your spreadsheet's margins.

When entering a range into the **Custom Cell Range** use the format `A1:Z1000`, where `A1` is the top left cell to insert data into and `Z1000` is the bottom right cell.

![Range setting in sync configuration](https://mintcdn.com/hightouch-3c037897/L_vQfA0JQEpeGUUo/images/destinations/destination-google-sheets-range.png?fit=max\&auto=format\&n=L_vQfA0JQEpeGUUo\&q=85\&s=8c93cbf04142a8eee9ec5a68312a58bf)

> [!TIP]
>
> Ensure you the custom cell range is large enough to contain the data you want
> to sync. If it isn't, the sync will fail with a [**Query results are too large
> for provided range**]() error.

## Tips and troubleshooting

To see the exact API requests and responses from each sync run, use the [live debugger](https://docs.hightouch.com/syncs/debugger.md). To get notified by Slack, PagerDuty, SMS, or email when a sync fails, set up [sync alerts](https://docs.hightouch.com/syncs/alerting.md). If you run into an issue this page doesn't cover, [contact support](#pylon-chat).

### Need admin approval

If you see a **Need admin approval** page appear when [accessing Microsoft's OAuth login flow](#connect-to-microsoft-excel), your Azure Active Directory user account might not have the necessary permissions to connect applications to your organization.

![Microsoft's "Need admin approval" screen](https://mintcdn.com/hightouch-3c037897/L_vQfA0JQEpeGUUo/images/workspace-management/permissions/microsoft-need-admin-approval.png?fit=max\&auto=format\&n=L_vQfA0JQEpeGUUo\&q=85\&s=c9cf06dcd44f67bebf71c67bb2339af2)

Ask one of your Azure organization's admins to edit your user account permissions.

You can read more about [Azure user permissions](https://learn.microsoft.com/en-us/azure/active-directory/develop/active-directory-how-applications-are-added#who-has-permission-to-add-applications-to-my-azure-ad-instance) and [configuring user settings](https://learn.microsoft.com/en-us/azure/active-directory/manage-apps/configure-user-consent?pivots=portal#configure-user-consent-settings) in Azure's documentation.

## Common errors

### My data isn't appearing in Excel

Make sure to refresh your Excel worksheet after your sync has completed to see the updated values.

### Query results are too large for provided range

This error occurs if you've set a [custom cell range](#custom-cell-range) that isn't large enough for the dataset you're syncing. The error specifies if you need to update your row or column range.
