> For the complete documentation index, see [llms.txt](https://docs.decentraland.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.decentraland.org/creator/tutorials-and-examples/external-services/spreadsheet-data.md).

# Data from a spreadsheet

Scene content driven by a Google Sheet, updated without redeploying.

Drive scene content from a Google Sheet. Edit the sheet to change the artist name, video stream, and featured wearable without redeploying the scene.

## Project information

**Maintained by:** Decentraland

[View source](https://github.com/decentraland/Read_Spreadsheet_Scene)

**License:** [Apache-2.0](https://github.com/decentraland/Read_Spreadsheet_Scene/blob/main/LICENSE). Check upstream terms before reuse; code and assets may have different terms.

## Explore the code

These links point to a specific source snapshot so the explanations remain useful as upstream development continues. They are learning references, not a security assessment.

### Read a published Google Sheet as JSON

`getSpreadsheetData` requests the sheet through the Google Visualization endpoint (`gviz/tq?tqx=out:json`), strips the `setResponse(...)` wrapper, and turns each row into an object keyed by the column headers.

**Project context:** The sheet must be shared so anyone with the link can view it. `gid` selects the tab and `headers=1` treats the first row as column names.

**Source references:**

* [`getSpreadsheetData`](https://github.com/decentraland/Read_Spreadsheet_Scene/blob/57bb4086aed3054d69a74f33f20f2d86c4eb9bb6/src/scheduler.ts#L1-L47)

### Apply a row to the scene

`updateFromSpreadsheet` reads one row and updates a banner `TextShape`, replaces the screen's `VideoPlayer` source, swaps the wearable shown on the dispenser, and points the dispenser's click action at the row's purchase link.

**Project context:** Column names such as `NowPlaying`, `VideoURL`, `WearableURN`, and `BuyURL` must match the sheet headers. Entities are looked up by the names given in the Creator Hub scene.

**Source references:**

* [`updateFromSpreadsheet`](https://github.com/decentraland/Read_Spreadsheet_Scene/blob/57bb4086aed3054d69a74f33f20f2d86c4eb9bb6/src/index.ts#L10-L64)
* [`createWearable`](https://github.com/decentraland/Read_Spreadsheet_Scene/blob/57bb4086aed3054d69a74f33f20f2d86c4eb9bb6/src/index.ts#L100-L130)

### Cycle through rows from a Creator Hub button

`main` listens for the `Next` and `Previous` actions on the `Switch Artist` entity and wraps the row index around the downloaded data.

**Project context:** Uses `getActionEvents` from `@dcl/asset-packs`, so the actions are configured on the entity in the Creator Hub.

**Source references:**

* [`main`](https://github.com/decentraland/Read_Spreadsheet_Scene/blob/57bb4086aed3054d69a74f33f20f2d86c4eb9bb6/src/index.ts#L69-L97)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.decentraland.org/creator/tutorials-and-examples/external-services/spreadsheet-data.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
