> For the complete documentation index, see [llms.txt](https://docs.gpmautomate.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.gpmautomate.com/automate-en/action-guide/file-and-folder/append-excel-file.md).

# Append excel file

Add new data to the end of an existing Excel file without overwriting the current content.

Append excel file is an intelligent action used to automatically find the first empty row at the end of the data table and append content to it, allowing you not to manually calculate or manage the row index (`Row Index`).

🎥 Watch the tutorial video: [Here](https://youtu.be/EH7olDLAb9c).

#### Configuration parameters:

* File Path: The absolute path to the Excel file where data needs to be appended (e.g., `D:\GPM\data.xlsx`).
* Sheet index: The position of the sheet where data needs to be written, starting from 0 *(The first sheet is `0`)*.
* Column Name or Index: The position of the column where data needs to be written. You can specify it in two ways:
  * By letter: `A`, `B`, `C`, `D`...
  * By index number, starting from 1 *(Column A is `1`, Column B is `2`...)*.
* Value: The text content (or variable containing data) that you want to write into the last empty cell of that column.

#### Practical example: Append content to column B starting from row 6

Suppose you have an Excel file containing a current data list with entries from row 1 to row 5. You want to configure a script to automatically add new data (for example, a coupon code just scraped) into the next empty cell of column B (which is cell `B6`).

Instead of using the read file action to count which row is empty and then using the *Write excel file* command, you just need to configure the Append excel file action as follows:

* Configuration:
  * File Path: `D:\GPM\data.xlsx`
  * Sheet index: `0`
  * Column Name or Index: `B` *(Select column B to append data)*.
  * Value: Enter the string content (or pass a variable containing data, for example, the coupon code variable `$couponCode`).

Result: The system will automatically scan column B from top to bottom, recognize that rows 1 to 5 already have data, and immediately write the value of the variable into the first empty row (row 6 - cell `B6`). In the next run of the script, new data will again be automatically pushed down to row 7 (`B7`), row 8 (`B8`)... sequentially and accurately.

<figure><img src="https://2961903581-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpIRrmOLZkhHBXdAiidIw%2Fuploads%2Fgit-blob-1261fa7b60a060026d02e05f455152d528824f0d%2Fff-12.png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2961903581-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpIRrmOLZkhHBXdAiidIw%2Fuploads%2Fgit-blob-ef5f21de3369f7e4afdcaa6f3450a38e3a0aad20%2Fff-12b.png?alt=media" alt=""><figcaption></figcaption></figure>


---

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.gpmautomate.com/automate-en/action-guide/file-and-folder/append-excel-file.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
