# SheetsAppendValuesTool

> **Class** in `langchain_google_community`

📖 [View in docs](https://reference.langchain.com/python/langchain-google-community/sheets/write_sheet_tools/SheetsAppendValuesTool)

Tool for appending values to a Google Spreadsheet table.

Inherits from
[`SheetsBaseTool`][langchain_google_community.sheets.base.SheetsBaseTool].

Appends data to the end of a table, automatically finding the last row with
data.

!!! note "Authentication Required"

    Requires OAuth2 authentication. Use `api_resource` parameter with
    authenticated Google Sheets service.

## Signature

```python
SheetsAppendValuesTool()
```

## Description

**Tool Output:**

success (bool): Whether operation succeeded.
spreadsheet_id (str): The spreadsheet ID.
table_range (str): The range of the entire table.
updated_range (str): The specific range where data was appended.
updated_rows (int): Number of rows appended.
updated_columns (int): Number of columns appended.
updated_cells (int): Total number of cells updated.

???+ example "Basic Usage"

    Append new records to a table:

    ```python
    from langchain_google_community.sheets import SheetsAppendValuesTool

    tool = SheetsAppendValuesTool(api_resource=service)
    result = tool.run(
        {
            "spreadsheet_id": "1TI6vO9eGsAeXcfgEjoEYcu4RgSZCUF4vdWGLBpg9-fg",
            "range": "Sheet1!A1:D100",
            "values": [
                ["Eve", "27", "Seattle", "91"],
                ["Frank", "32", "Denver", "85"],
            ],
        }
    )
    ```

??? example "With Insert Rows Option"

    Insert rows instead of overwriting:

    ```python
    result = tool.run(
        {
            "spreadsheet_id": "1TI6vO9eGsAeXcfgEjoEYcu4RgSZCUF4vdWGLBpg9-fg",
            "range": "Sheet1!A1:D100",
            "values": [["New", "Record", "Data", "Here"]],
            "insert_data_option": "INSERT_ROWS",
        }
    )
    ```

## Extends

- `SheetsBaseTool`

## Properties

- `name`
- `description`
- `args_schema`

---

[View source on GitHub](https://github.com/langchain-ai/langchain-google/blob/a3f016b2a6c4af535df275545f76fa7424aa39e5/libs/community/langchain_google_community/sheets/write_sheet_tools.py#L231)