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

# Other classes: Formulas and names

## `LinkedWorkbook`

`Excel.LinkedWorkbook`: another workbook the formulas read, keyed by its address.

Import from `@reductoai/xlsx/officejs`.

### LinkedWorkbook properties

| Name | Type | Description |
| - | - | - |
| `id` | `string` | read-only |

### `LinkedWorkbook.breakLinks()`

```ts theme={null}
breakLinks(): void
```

Formulas that read the workbook become their last values.

### `LinkedWorkbook.refresh()`

```ts theme={null}
refresh(): void
```

The file holds no copy of the linked book, so the cached values stay as they are.

## `LinkedWorkbookCollection`

`Excel.LinkedWorkbookCollection`: the `xl/externalLinks` books.

Import from `@reductoai/xlsx/officejs`.

### LinkedWorkbookCollection properties

| Name | Type | Description |
| - | - | - |
| `items` | `LinkedWorkbook[]` | read-only |
| `workbookLinksRefreshMode` | `WorkbookLinksRefreshMode` | Automatic when Excel refreshes the links as it opens the file (`updateLinks="always"`). |

### `LinkedWorkbookCollection.breakAllLinks()`

```ts theme={null}
breakAllLinks(): void
```

### `LinkedWorkbookCollection.getItem()`

```ts theme={null}
getItem(key: string): LinkedWorkbook
```

### `LinkedWorkbookCollection.getItemOrNullObject()`

```ts theme={null}
getItemOrNullObject(key: string): Nullable<LinkedWorkbook>
```

### `LinkedWorkbookCollection.refreshAll()`

```ts theme={null}
refreshAll(): void
```

## `NamedItemArrayValues`

`Excel.NamedItemArrayValues`.

Not exported by name. You get it from the API.

### NamedItemArrayValues properties

| Name | Type | Description |
| - | - | - |
| `types` | `RangeValueType[][]` | read-only |
| `values` | `(string \| number \| boolean)[][]` | read-only |
| `valuesAsJson` | `BasicCellValue[][]` | read-only |
| `valuesAsJsonLocal` | `BasicCellValue[][]` | read-only |

## `ScenarioCollection`

`Worksheet.Scenarios`: the sheet's scenarios, in the order Scenario Manager lists them.

Not exported by name. You get it from the API.

### ScenarioCollection properties

| Name | Type | Description |
| - | - | - |
| `count` | `number` | read-only |
| `items` | `WorksheetScenario[]` | read-only |
| `resultCells` | `string` | Extension: Summary's result cells, which the next Summary offers. |
| `state` | `{ result: string; shown: string \| null }` | read-only Extension: the scenario shown last, if any, and the result cells the last summary used. |

### `ScenarioCollection.add()`

```ts theme={null}
add(
  name: string,
  changingCells: string,
  values: unknown[],
  options?: ScenarioOptions,
): WorksheetScenario
```

Values are entered as typed when the scenario is shown, so `"12"` gives a number.

### `ScenarioCollection.getItem()`

```ts theme={null}
getItem(name: string): WorksheetScenario
```

## `WorksheetScenario`

`Scenario`: one `<scenario>`; its name is its key.

Not exported by name. You get it from the API.

### WorksheetScenario properties

| Name | Type | Description |
| - | - | - |
| `changingCells` | `string` | read-only The changing cells as Excel lists them: `$B$1,$B$2`. |
| `comment` | `string` | |
| `hidden` | `boolean` | |
| `locked` | `boolean` | |
| `name` | `string` | |
| `user` | `string` | read-only |
| `values` | `string[]` | read-only |

### `WorksheetScenario.change()`

```ts theme={null}
change(changingCells: string, values: unknown[], user?: string): void
```

VBA's `ChangeScenario`: new cells and values, and Excel's "Modified by" line under the comment.

### `WorksheetScenario.delete()`

```ts theme={null}
delete(): void
```

### `WorksheetScenario.show()`

```ts theme={null}
show(): void
```

Enters the values in the changing cells, as typed, and marks the scenario as shown.
