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

# Install the spreadsheet extension

> How to download the Atoti UI spreadsheet extension from Artifactory and plug it into an Atoti UI build by registering it in extensions.json, in a Java project or a standalone Atoti UI, including the order of the extensions and troubleshooting.

The [spreadsheet](../../user-guide/create-a-dashboard/spreadsheets) is an extension, not part of core Atoti UI.
Plugging it adds:

* the **New spreadsheet** item of the **Insert** menu, which creates a spreadsheet page,
* the **Pivot table v2**, **Table v2** and **Tree table v2** widgets.

The extension is published to the `atoti-ui-spreadsheet-generic-release` repository of our [Artifactory](https://activeviam.jfrog.io/ui/repos/tree/General/atoti-ui-spreadsheet-generic-release).
To get access to this repository, contact your account manager.

<Note>
  Authentication to Artifactory is required to follow the link above. Otherwise,
  it may look broken or unavailable.
</Note>

## Download the extension

Log into Artifactory as described in [Set up](./set-up#log-into-artifactory).
When you have access to the `atoti-ui-spreadsheet-generic-release` repository, download the build of the extension from it: `atoti-ui-spreadsheet-extension-{atotiUIVersion}.zip`.
Use the version matching the version of your Atoti UI.

The archive contains a single `spreadsheet-extension` folder, holding the built extension and its entry file, `extensionEntry.js`.

## In a Java project

Make sure your project includes the [Atoti UI Spring Boot starter](https://docs.activeviam.com/engine/java-sdk/latest/starters/atoti_ui_starter/).

1. Extract the archive, and move the `spreadsheet-extension` folder to `resources/static/atoti-ui/extensions/@activeviam/spreadsheet-extension`.

2. Create or edit the file at `resources/static/atoti-ui/extensions.json`, and add the following entry to it:

   ```json theme={"languages":{"custom":["/engine/python-sdk/6.2/languages/pycon.tmLanguage.json"]}}
     "@activeviam/spreadsheet-extension": "extensions/@activeviam/spreadsheet-extension/extensionEntry.js"
   ```

3. Rebuild your project, then run it.

4. Clear your browser cache and refresh the page, for instance by pressing <kbd>Ctrl</kbd> + <kbd>F5</kbd>.

The **Insert** menu of a dashboard now shows **New spreadsheet**.

## In a standalone Atoti UI

1. Extract the archive, and move the `spreadsheet-extension` folder to `extensions/@activeviam/spreadsheet-extension`, at the root of your Atoti UI folder.
2. Open the file named `extensions.json` at the root of your Atoti UI folder, and add the entry mentioned in the [paragraph above](#in-a-java-project) to it.
3. Start your server if it is not already running.
4. Clear your browser cache and refresh the page.

For more details on plugging an extension into an Atoti UI build, see [plug an extension](../customize-atoti-ui/reuse-extensions/create-reusable-extensions#plug-an-extension).

## Order of the extensions

Atoti UI activates the extensions in the order of `extensions.json`.

The v2 table widgets copy the context menu of their standard counterparts when the spreadsheet extension is activated.
Register the extensions that add items to the context menu of table widgets, such as your own [custom menu items](../customize-atoti-ui/customize-the-dashboard/customize-existing-widgets/create-a-custom-menu-item), before the spreadsheet extension.
Otherwise, the v2 table widgets do not show these items.

## Troubleshooting

To check that the extension is registered, open a dashboard and open the **Insert** menu of the application header.
It contains the item **New spreadsheet** when the extension is registered.

If it does not, open the developer tools of your browser:

* In the **Console** tab, look for an error about the extension, such as *"Could not activate extension "@activeviam/spreadsheet-extension""*.
  This class of errors is caused by the extension failing to register.
  This may be for instance because the application menu does not contain the **Insert** submenu, with the key `insert-submenu`, to which the extension attempts to add **New spreadsheet**.
* In the **Network** tab, reload the page and select the request to `extensions.json`.
  Check that its response contains the entry of the spreadsheet extension.
  If it does not, the `extensions.json` file of your deployment was probably not updated, or your browser serves a cached version of it.
  In the latter case, clear your browser cache and reload the page.
* In the **Network** tab, check that the request to `extensionEntry.js` under `extensions/@activeviam/spreadsheet-extension` succeeds.
  A failed request means that the folder of the extension is not where `extensions.json` points.
