> For the complete documentation index, see [llms.txt](https://docs.feathery.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.feathery.io/platform/document-autofill-and-signatures/autofill-document-templates/excel-autofill.md).

# Excel Autofill

If you upload an Excel template, you can include variables in your spreadsheet via double-curly brace syntax (`{{Field1}}`). Feathery will automatically replace variables with the corresponding field value when you fill them out.

## Conditional Sheet Generation

You can include conditional logic that determines if a given individual sheet of your spreadsheet will be included in the final output. To do so, set the name of the sheet to a field variable with double-curly brace syntax. If the field ends up having an empty value, the corresponding sheet will **not** be included in the final spreadsheet output. Otherwise, the name of the sheet will be replaced with the field value and kept in the spreadsheet as usual.

## Conditionally Hide Rows and Columns

You can conditionally hide rows by placing the following syntax in a cell:

```
feathery.hide_row = {{FieldID}}
```

If the field value contained in `FieldID` is truthy (`True`, `1`, etc), the entire row where the cell resides will be hidden. Similarly for hiding columns you can use:

```
feathery.hide_col = {{FieldID}}
```

## Rich Text Formatting

You can apply inline formatting to cell values using backslash-tag syntax. Tags can be nested.

| Syntax              | Effect                 |
| ------------------- | ---------------------- |
| \bold(text)         | Bold                   |
| \italic(text)       | Italic                 |
| \underline(text)    | Underline              |
| \color.RRGGBB(text) | Font color (hex, no #) |

Example:

```
\bold(\color.FF0000(Warning:)) \italic(please review this section.)
```

Tags can wrap variable placeholders as well:

```
\bold({{FieldName}})
```

## Array Fill

#### Vertical

If a field's value is a list (e.g. a repeating section or multi-value field), Feathery will automatically expand the placeholder downward, one row per list item. If the rows below the placeholder are already occupied, Feathery inserts new rows to preserve existing content and copies the cell's formatting (borders, font, fill, alignment) to each inserted row.

#### Horizontal

To expand a list field sideways across columns instead of downward, use the `feathery.horizontal` syntax:

```
feathery.horizontal = {{FieldID}}
```

Feathery will write one list item per column, inserting new columns as needed so existing content is not overwritten.


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.feathery.io/platform/document-autofill-and-signatures/autofill-document-templates/excel-autofill.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
