> ## Documentation Index
> Fetch the complete documentation index at: https://lightdash-codex-docs-value-label-colors.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Lightdash for Google Sheets™

> Build Lightdash queries from a sidebar inside Google Sheets and keep the results refreshable

Lightdash for Google Sheets™ is an add-on that runs inside Google Sheets™ as a sidebar so you can build queries from your Lightdash instance without leaving the spreadsheet. Each query you run becomes a **range** in the sheet that you can refresh in place, edit, or remove later. The add-on connects to your instance with OAuth and uses your existing Lightdash permissions, user attributes, and caching.

Install the add-on from the [Google Workspace Marketplace](https://workspace.google.com/marketplace/app/lightdash/598569222430), then open it from **Extensions → Lightdash → Open sidebar**.

<Frame>
  <img src="https://mintcdn.com/lightdash-codex-docs-value-label-colors/PNzpnmeh_Zzk_Mzz/images/integrations/google-sheets/add-on-range.png?fit=max&auto=format&n=PNzpnmeh_Zzk_Mzz&q=85&s=d1360e4c93c96156845bd4cbc3103ff6" alt="A Lightdash range in Google Sheets with the sidebar showing its query, refresh, edit, and remove actions" width="1280" height="800" data-path="images/integrations/google-sheets/add-on-range.png" />
</Frame>

## Ranges

A range is the block of cells a query wrote to, plus the query behind it. The sidebar opens on the list of ranges in the spreadsheet.

* **Refresh in place**: re-running a range writes fresh results over the same cells. If the result grew, the range expands into empty cells below or to the right, or shifts whatever is in the way within its own columns and rows. If it shrank, the leftover cells are cleared.
* **Several per sheet**: put ranges side by side or on different tabs and refresh them individually, or use **Refresh all** from the sidebar or the **Lightdash** menu.
* **Protected, not locked**: each range is a named range with a warning-only protection. Editing a cell inside one shows a "Heads up" prompt rather than blocking the edit, so shared sheets stay editable.
* **Usable in formulas**: the named range (for example `Lightdash_orders`) works anywhere you'd reference cells, such as `=SUM(Lightdash_orders)`.
* **Survives edits around it**: inserting or deleting rows and columns elsewhere in the sheet keeps the range attached to its cells.
* **Shared with collaborators**: ranges are stored in the spreadsheet, so anyone who opens it sees the same list. Refreshing needs a Lightdash login, so each person connects their own account. Ranges are not carried over by **File → Make a copy**.

## Build a query

1. Select the cell where the results should start and choose **New query**.
2. Pick a project, then an explore, and add dimensions and metrics. Drag a dimension into **Columns** to pivot.
3. Adjust filters. Filters defined in your dbt models are respected: `required_filters` are prefilled and can't be removed (values are still editable), while `default_filters` are prefilled but can be adjusted or removed. Add your own dimension and metric filters on top.
4. Choose **Insert**. The sidebar shows where the results will go and follows your selection while you build. If the selected cell is inside an existing range, pick a cell outside it first.

Results are written with a bold header row and light banding, starting at the selected cell. If those cells already hold data, the sidebar asks before overwriting them.

## Manage a range

Select a range in the sidebar list to open it. From there you can:

* **Refresh** to re-run the query.
* **Edit query** to reopen the builder with the saved query loaded. **Update range** rewrites the same cells with the new result.
* **Rename** by selecting the range's name.
* **Remove** to delete the saved query and its protection, keeping or clearing the cells.

Selecting a range in the list also moves the sheet selection to it.

## Sign in with your Lightdash account

Authentication uses OAuth against your Lightdash instance, so results reflect what the signed-in user is allowed to see. The account and a **Disconnect** link are shown at the bottom of the sidebar.

## How the add-on uses your Google data

The add-on reads and writes only the spreadsheet it is opened in, so that it can insert and refresh the query results you ask for. It does not access your other files or your Google account data.

Lightdash's use of information received from Google APIs follows the [Google API Services User Data Policy](/integrations/google-sheets#google-api-services-user-data-policy).

See the Lightdash [privacy policy](https://www.lightdash.com/privacy-policy) and [terms of service](https://www.lightdash.com/terms-of-service).

Google Sheets™ is a trademark of Google LLC.
