# Generating Excel

## Overview

You can generate an Excel spreadsheet from your Model at the click of a button.

These spreadsheets are:

* Free of copy/paste formula errors
* Neatly and consistently formatted
* Fully-working and dynamic, allowing your colleagues and clients to explore your model without needing access to the Models software

## Layouts

To generate Excel, you first need to create a **Layout**. The Layout tells Models where you want the various parts of your Model ([**Variables**](https://help.taglo.io/variables), [**Assumptions**](https://help.taglo.io/assumptions), [**Dashboards**](https://help.taglo.io/dashboards) etc.) to appear in your spreadsheet.

Your Model's Layout is independent of the Calculation structure - so unlike in Excel, moving things around in the Layout can't affect any of the Calculations being performed. This means you can quickly edit the layout of your spreadsheet, without needing to worry about breaking a formula. Instead, you can focus on improving the readability of the spreadsheet, or whatever is important for your particular project.

That said, you do need to make sure that you have included all components of a Calculation in the Layout for the Calculation to be performed. If your Layout is missing a part of a Calculation tree (any Variables and Assumptions on which the Calculation is dependent), the spreadsheet will still be generated, but you will see warnings where components are missing.

{% hint style="info" %}
You can add the same Variable to the Layout multiple times. A calculation formula will only be created in the first instance of the Variable; subsequent instances will reference the first instance.
{% endhint %}

{% hint style="warning" %}
Currently, you can only create one Layout per Model. We may add the ability to create multiple Layouts in future updates (e.g. so that you can include/exclude parts of the Model depending on audience) - let us know if you would be interested in this feature.
{% endhint %}

## Layout Views

Models provides two views for examining your Excel layout, Spreadsheet view (left) and Logical view (right).

<figure><img src="https://2847533834-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVy65sax6FVoNo2UTlJ0x%2Fuploads%2F1jEQbL4lO4qoxmrOnlKr%2Fimage.png?alt=media&#x26;token=5d9c467b-4fe0-4d1d-8348-7fc8856fd70b" alt="Screenshot of the two views for Excel layouts"><figcaption><p>Excel layout views</p></figcaption></figure>

### Spreadsheet view (default)

This view shows a representation of how your generated Excel will look, including all calculated values, and borders, bold/italic text (note, it does not show how the selected [**Model Theme**](https://help.taglo.io/layout/excel-formatting/excel-themes-and-styles) will look).

Values representing assumptions (with a green background) can be edited directly in this view.

### Logical view

This view shows simplified [**Line Groups**](https://help.taglo.io/sheets/sheet-content#line-groups) and Variables but does not show any calculated values. This view is helpful when reorganising a sheet and allows quick rearranging of items.

## Creating your Layout Automatically

Models provides an easy way of adding multiple items to the Layout in a logical fashion with just a few button clicks. Details are on the [**next page**](https://help.taglo.io/layout/auto-layout).

## Creating your Layout Manually

Models provides two main methods of creating and editing your Layout manually:

1. From within the **Sheets tab** of the [**Model Editor**](https://help.taglo.io/models/model-editor). Here you can easily see all of the items in each [**Sheet**](https://help.taglo.io/layout/sheets) and edit them directly.

<figure><img src="https://2847533834-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVy65sax6FVoNo2UTlJ0x%2Fuploads%2FPG0KOsZrWsh2G7YEOmL7%2Fimage.png?alt=media&#x26;token=7e591fd5-807a-44f3-a475-c63ee3eb88a4" alt="Screenshot of the Sheets tab with contents of the sheet displayed in a treeview" width="563"><figcaption><p>The <strong>Sheets tab</strong></p></figcaption></figure>

2. By adding items directly to the Layout from the [**Variables**](https://help.taglo.io/variables), [**Assumptions**](https://help.taglo.io/assumptions) and [**Metrics**](https://help.taglo.io/metrics) tabs. Here you can add items to the Layout as you create them without needing to leave your workflow.

<figure><img src="https://2847533834-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVy65sax6FVoNo2UTlJ0x%2Fuploads%2Fa1z5JIcyWEDd4lwy9W0H%2Fimage.png?alt=media&#x26;token=2ce9b7c8-f6f4-4a87-81e5-12e5fa546ed5" alt="Screenshot of Variables list view, with &#x22;Add to sheet&#x22; buttons showing on Variable items that haven&#x27;t been added to the layout."><figcaption><p><strong>Add to sheet</strong> buttons in the <strong>Variables tab</strong></p></figcaption></figure>

The next sections provide more detail of how to build and edit your Layout.
