---
title: Write data back to Databricks using the Databricks Excel Add-in
description: Write data from Microsoft Excel back to a Unity Catalog table with the Databricks Excel Add-in. Create a new table or overwrite an existing one.
canonical_url: https://docs.databricks.com/gcp/en/integrations/excel/write-back
---

# Write data back to Databricks using the Databricks Excel Add-in

The Databricks Excel Add-in lets you write data from Microsoft Excel back to a Unity Catalog table. You can create a new table or overwrite an existing table in Databricks without leaving Excel.

## Prerequisites

Before you write data back to Databricks from Excel:

* The Databricks Excel Add-in is [installed and configured](https://docs.databricks.com/gcp/en/integrations/excel/connect.md).
* You have **Workspace access**. See [Manage entitlements](https://docs.databricks.com/gcp/en/security/auth/entitlements.md).
* You have access to a running [SQL warehouse](https://docs.databricks.com/gcp/en/compute/sql-warehouse/index.md).
* Your workspace admin has enabled **Allow spreadsheet writeback**. To access this setting, click your username in the upper-right corner, select **Settings**, then click **Security** in the sidebar.
* You have the necessary privileges on the target catalog and schema in Unity Catalog.

  * To create a new table, you must have the following privileges:
    * `USE CATALOG` on the catalog
    * `USE SCHEMA` on the schema
    * `CREATE TABLE` on the schema
  * To overwrite an existing table, you must have the following privileges:
    * `USE CATALOG` on the catalog
    * `USE SCHEMA` on the schema
    * `SELECT` on the table
    * `MODIFY` on the table

  For more information, see [Unity Catalog privileges reference](https://docs.databricks.com/gcp/en/data-governance/unity-catalog/access-control/privileges-reference.md).

## Select a SQL warehouse

Select which SQL warehouse to use:

1. In the upper-right of the Databricks Add-in pane in Excel, click the drop-down menu.
2. Select which SQL warehouse you want to use.

## <a id="write-back" />Write data back to Databricks

You can write an Excel range back to Databricks in one of two ways:

* **Create a new table**: Create a new Unity Catalog table from the selected Excel range.
* **Overwrite an existing table**: Replace the contents of an existing Unity Catalog table with the selected Excel range.

To create a new Unity Catalog table or overwrite an existing Unity Catalog table from Excel:

1. In the Databricks Excel Add-in pane, click the **Write back** tab.
2. Select **Create table** or **Overwrite table**.
3. Search for and select the destination **Catalog** and **Schema**.
4. Specify the target table:
   * To create a new table, enter a name.
   * To overwrite an existing table, select the table you want to overwrite.
5. By default, the first row of the selected range is used as the column headers. You can change this under **Advanced options**.
6. Enter the Excel cell range that contains the data you want to write, then click **Use selection**.
7. (Optional) Edit column names. To directly edit a column name, click the column name field in the table preview.
8. (Optional) Edit column types. In the table preview, click ![Letters icon.](https://docs.databricks.com/gcp/en/images/product-icons/LettersIcon.svg) letter icon and select the data type you want.
9. Click **Write to table**.

> [!NOTE]
>
> To stop a write-back that is in progress, click **Cancel** in the Excel Add-in pane.

## Limitations

* Write-back supports table-level writes only. Row-level updates, appends, and merges are not supported.
* Write-back does not support creating views or materialized views.
* The Excel Add-in only supports SQL warehouses. All-purpose compute is not supported.
* Write-back doesn't set its own row or column limit. It writes the entire selected range, so the Excel worksheet size is the limit: a maximum of 1,048,576 rows and 16,384 columns per sheet. These limits aren't configurable.

## Additional resources

* [Connect to Databricks from Microsoft Excel](https://docs.databricks.com/gcp/en/integrations/excel/index.md)
* [Set up the Databricks Excel Add-in](https://docs.databricks.com/gcp/en/integrations/excel/connect.md)
* [Import and query data using the Databricks Excel Add-in](https://docs.databricks.com/gcp/en/integrations/excel/query-data.md)
