> For the complete documentation index, see [llms.txt](https://calctree.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://calctree.gitbook.io/docs/integrations/3rd-party-plugins/excel.md).

# Excel

The CalcTree Excel add-in lets you run approved engineering calculations, link spreadsheet data to reports, and collaborate with your team—all within Excel.

![CalcTree <> Excel integration](https://94933883-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS1yC9mBIPsA0bB8PMGaq%2Fuploads%2F8e9MzTggu1Gj5OUaeejW%2Fimage.png?alt=media\&token=5a7c3e7c-b61b-41f4-9ace-5f63c384c5e9)

## Example Use Cases

* Ensure team members use approved calculations when working in Excel
* Run bulk calculations in Excel of calculations hosted on CalcTree
* Populate report templates on CalcTree with data from Excel in one click

## Installation

The CalcTree Excel add-in is available on the [Microsoft Marketplace](https://marketplace.microsoft.com/en-us/product/WA200012024).

1. Open Excel and go to **Insert > Get Add-ins**
2. Search for **CalcTree**
3. Click **Add** to install

The add-in will appear in your ribbon and is ready to use.

### Teams and organisations

If your organisation restricts add-in installs, or you want CalcTree deployed centrally across your team, get in touch at **<contact@calctree.com>**. We will work with you and your IT administrators on the right deployment for your organisation.

## Getting Started

When you open the CalcTree Excel add-in for the first time, you'll be prompted to enter your:

* [API Key](https://calctree.gitbook.io/docs/connect-your-engineering-tools/graphql-api/generating-an-api-key)
* Workspace URL (use any page URL from the target workspace)

You can update these later by clicking the settings (gear) icon in the bottom-right corner of the plugin (see left image below).

![Access and manage API and Workspace URL settings](https://94933883-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS1yC9mBIPsA0bB8PMGaq%2Fuploads%2FdMUsoDknmzotScGf0Y7F%2Fimage.png?alt=media\&token=dc754777-8607-481c-ab4e-7ee28cf0f2ea)

## Navigating Your Workspace

Once connected to your CalcTree workspace, you can browse through available calculations directly in Excel. These are organized by folders and categories.

* Expand or collapse calculation branches using the toggle arrows
* Click the calculation title to open its details
* Click the star icon to add calculations to your Favourites

![Navigate through calculations and add as favourites](https://94933883-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS1yC9mBIPsA0bB8PMGaq%2Fuploads%2FsPLI5jBVuIvK9XdyzBjc%2Fimage.png?alt=media\&token=cf6257e5-f070-4a62-836d-8ef57b9c753b)

## Viewing Calculation Details

Click on any calculation to view its details:

* **Overview** - View and click the link to see the source page.
* **Parameters** - View all parameters on the page. See the display name, name, formula, and current default value.
* **Send data** - Send and sync data from Excel ranges to parameters and tables in CalcTree \[See section 7].
* **View Usage** - View and rerun all instances of a calculation's usage within your spreadsheet \[See section 8].

Viewing the calculation details of a CalcTree page helps to understand how to integrate it into your spreadsheet.

![Click into a page Overview and Parameters toggles for more details](https://94933883-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS1yC9mBIPsA0bB8PMGaq%2Fuploads%2FCThIX8uvdd934lsa0dwH%2Fimage%20\(4\).png?alt=media\&token=f5348032-77d2-4711-8551-9299d9e2416e)

## Running a Calculation

Click the **Use** button to the right of any calculation to use it in your spreadsheet.

![Use button](https://94933883-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS1yC9mBIPsA0bB8PMGaq%2Fuploads%2FMIsNNRM0s3mQ6slwpskx%2Fimage.png?alt=media\&token=8fba0a7f-8276-4a76-8fb9-8b71b1f3f043)

You can run a calculation in two ways:

### Single Operation

Ideal for one-off calculations using selected cells, with only one set of input data. This inserts a `=CALCTREE.CALC()` formula into your spreadsheet.

![Single operation dialogue](https://94933883-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS1yC9mBIPsA0bB8PMGaq%2Fuploads%2FxxXCoGP1689k7guCnQ3X%2Fimage.png?alt=media\&token=e9d2f9ba-8e64-4ded-ae67-5a58a12884b5)

Insert the cells you want to reference into this dialogue by clicking the range you want, then click the text area for the corresponding field in the dialogue.

### Batch Operation

Use this when you have multiple rows of input data and want to run the same CalcTree calculation across all of them. This inserts a `=CALCTREE.BULK_CALC()` formula that runs the calculation once per row in a single batch request.

You can start a batch operation in two ways:

* **Current selection** — use an existing range in your spreadsheet as inputs
* **Insert in new sheet** — create a new sheet with the calculation's parameters as column headers

![Batch operation options](https://94933883-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS1yC9mBIPsA0bB8PMGaq%2Fuploads%2FWblkgPZ9FNXRlxJBvkmN%2Fimage.png?alt=media\&token=6d98066a-47db-4288-906f-9bea04bfe065)

When you select an option, the **Select Parameters** dialogue will pop up. This dialogue lets you choose which input parameters to send and which output parameters to receive back.

#### Current selection

Your selected range must follow this structure:

* **Row 1** — variable **names** (the technical identifiers shown in the Parameters tab, not the display names)
* **Rows 2+** — one row of input values per calculation run

For example, if a Wind Load on Sign calculation has parameters `V`, `W`, `H`, and `F_limit`, your selection should look like:

| V  | W   | H   | F\_limit |
| -- | --- | --- | -------- |
| 35 | 4.0 | 2.5 | 8.0      |
| 40 | 8.0 | 1.2 | 12.0     |
| 30 | 1.2 | 0.8 | 1.5      |

Results are written to the right of your selection, one row per input row. Make sure there are enough empty columns to the right for all the output parameters you selected.

Any parameters not included in your selection will use their default values from the CalcTree page.

![Current selection example](https://94933883-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS1yC9mBIPsA0bB8PMGaq%2Fuploads%2FDHdJS3MIu5xIyUE7azOo%2Fimage.png?alt=media\&token=4f839dac-4a4f-4962-96f0-d4e87bbfd5f8)

#### Insert in new sheet

This option creates a new sheet named after your calculation with pre-made headers matching the parameters you selected.

Simply add your input data into the corresponding columns, and the calculation will process to the right of the input data.

![Insert in new sheet example](https://94933883-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS1yC9mBIPsA0bB8PMGaq%2Fuploads%2FjA22Tt1wb7VjbdBIKScS%2Fimage.png?alt=media\&token=684783f6-5822-414c-b5b4-78d775f9c065)

## Sending and Linking Data

This is a useful feature for pre-populating report templates on CalcTree with spreadsheet data.

In the **Send Data** tab, you can link spreadsheet ranges to CalcTree parameters and keep them in sync.

* Select a cell or range in your Excel sheet.
* Click **Set** next to the corresponding parameter in the Send Data table. The selected range will appear in the table.
* Click **Update** to send that data to the CalcTree parameter.

You can continue updating individual parameters as needed, or use **Update All** to send all linked values at once.

Whenever your spreadsheet data changes, simply click **Update** or **Update All** to push the latest values to CalcTree.

![Pushing data from Excel into CalcTree](https://94933883-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS1yC9mBIPsA0bB8PMGaq%2Fuploads%2FywjKJKWAS4AiAw3RHOTW%2Fimage.png?alt=media\&token=2b4528c8-d091-4be3-9f61-32fd3d728916)

## Usage Tracking and Reuse

The **View Usage** tab allows you to track how and where each calculation has been used in your spreadsheet. This includes:

* Whether it was run as a single calculation or in bulk
* The exact cell range where the calculation was applied
* The timestamp of the last run
* The ability to add inline comments next to each calculation for notes or context
* The option to re-run calculations directly from this view by clicking **Update** or **Update All**

![The view usage toggle](https://94933883-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS1yC9mBIPsA0bB8PMGaq%2Fuploads%2FGymDN8we5NHcMFlla3yy%2Fimage.png?alt=media\&token=dfbf2344-a9e8-4a01-8974-697b65c4b487)

## Install as Formula

**Install as Formula** lets you call a CalcTree page directly from any Excel cell using a typed formula name — with full autocomplete in the formula bar.

#### Requirements

* **Microsoft 365 subscription** (Windows or Mac) — this feature uses Excel's LAMBDA function, which requires a current Microsoft 365 build
* **Not available on:** Excel 2019, Excel 2021 (perpetual licence), or Excel for the web
* The CalcTree add-in must be active in the workbook

#### What it does

Once installed, a CalcTree page becomes a named function in your workbook. For example, after installing a crack control calculation you can type:

```
=CT_CrackControl(h, Act, fct_eff, sigma_s)
```

Excel's formula bar shows the function name, all parameter names, and a description as you type — exactly like a built-in function. Results spill automatically if multiple outputs are selected.

#### How to install

1. Open the CalcTree task pane and expand any calculation
2. Click **Install as Formula** (the fifth section)
3. The formula name is auto-generated from the page title (e.g. `CT_CrackControl`) — you can edit it before installing
4. Inputs are detected automatically from the page; select which outputs you want returned
5. Choose **number only** or **with unit** output format
6. Click **Install**

The function is now registered in the workbook's Name Manager (Formulas > Name Manager). A **lambda** badge appears next to the calculation in the task pane list.

#### Updating or removing

* To change the outputs or name: expand **Install as Formula** and click **Update**
* To remove: click **Uninstall**, or delete the entry from Formulas > Name Manager directly

#### Notes

* Installed formulas are stored in the workbook file and persist when you share it — any recipient with the CalcTree add-in active can use them
* The formula calls `CALCTREE.CALC` internally, so live recalculation works the same way
* Use `INDEX(CT_FunctionName(...), row)` to extract a single output when multiple are selected

## Formula Reference

The add-in registers two custom functions you can use directly in cells. Normally these are inserted by the task pane UI, but you can also type them manually.

### CALCTREE.CALC

Runs a single CalcTree calculation.

```
=CALCTREE.CALC(api_key, page_url, input_names, input_values, output_names, output_format)
```

| Parameter       | Description                                               |
| --------------- | --------------------------------------------------------- |
| `api_key`       | Your CalcTree API key                                     |
| `page_url`      | Full URL of the CalcTree page                             |
| `input_names`   | Range containing the variable names (one row)             |
| `input_values`  | Range containing the corresponding input values (one row) |
| `output_names`  | Range containing the output variable names to return      |
| `output_format` | `"number-only"` (default) or `"with-unit"`                |

### CALCTREE.BULK\_CALC

Runs a CalcTree calculation across multiple rows of input data in a single batch request.

```
=CALCTREE.BULK_CALC(api_key, page_url, input_data, output_names, output_format)
```

| Parameter       | Description                                                                                  |
| --------------- | -------------------------------------------------------------------------------------------- |
| `api_key`       | Your CalcTree API key                                                                        |
| `page_url`      | Full URL of the CalcTree page                                                                |
| `input_data`    | Range where **row 1 = variable names**, rows 2+ = input values (one row per calculation)     |
| `output_names`  | Range containing the output variable names to return (optional — omit to return all outputs) |
| `output_format` | `"number-only"` (default) or `"with-unit"`                                                   |

Results spill into the cells to the right of the formula, with the first row containing output parameter names and subsequent rows containing the calculated values.

## Summary

The CalcTree Excel add-in turns engineering spreadsheets into dynamic tools by integrating robust, traceable, and reusable calculations from your CalcTree workspace.

Let us know if you'd like to:

* Set up standard calculation libraries for your team
* Customise workspace branches by project or client
* Automate data syncing between Excel and Python calculations

If you have any questions or run into issues, feel free to reach out to us at **<contact@calctree.com>**. We're here to help.
