> For the complete documentation index, see [llms.txt](https://scenegroup.gitbook.io/cavalry/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://scenegroup.gitbook.io/cavalry/nodes/utilities/spreadsheet-lookup.md).

# Spreadsheet Lookup

Lookup values in spreadsheets based on keys.

Lookup values in spreadsheet data based on related text strings (keys). This could be useful, among other things, for creating **design systems** where many elements share common attributes. For example, in the table below, the **key** `corner-radius` would return a **value** of `10`. &#x20;

| Key           | Value |
| ------------- | ----- |
| corner-radius | 10    |

The advantage of using a lookup is that the row can be moved for organisational purposes without losing the link to the value.

### UI

**File** - connect a .csv or Google Sheet [Asset](/cavalry/user-interface/menus/window-menu/asset-window.md).

**Lookup Column** - select the column in your data to search for a key.

**Lookup Key** - specify the key (text) to find within the **Lookup Column**.

**Value Column** - select the column to match against the **Lookup Key**.&#x20;

### Example

{% hint style="success" %}
Example workflow:

1. Create a Rectangle.
2. Right click in the [Assets Window](/cavalry/user-interface/menus/window-menu/asset-window.md) and select **Import Google Sheet...**
3. Paste in this url - [**https://docs.google.com/spreadsheets/d/1DB4Yv0W\_sT1nIlKiQFUBeQyXZoz88tdQt8YvLzXYwbU/edit?usp=sharing**](https://docs.google.com/spreadsheets/d/1DB4Yv0W_sT1nIlKiQFUBeQyXZoz88tdQt8YvLzXYwbU/edit?usp=sharing)
4. Create a **Spreadsheet Lookup**.
5. Drag the Google Sheet from the [Assets Window](/cavalry/user-interface/menus/window-menu/asset-window.md) to the **File** attribute on the **Spreadsheet Lookup**.
6. Select the `Key` column for **Lookup Column**.
7. Select the `Value` column for **Value Column**.
8. Enter `corner-radius` in the **Lookup Key**.
9. [Connect](/cavalry/getting-started/key-concepts/connections.md) ***spreadsheetLookup.id > rectangle.cornerRadius***.
   {% endhint %}

{% hint style="info" %}
If you change the data in your spreadsheet you'll need to right click on the spreadsheet Asset in the [Asset Window](/cavalry/user-interface/menus/window-menu/asset-window.md) and select **Reload**.
{% endhint %}
