> For the complete documentation index, see [llms.txt](https://docs.planetcrust.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.planetcrust.com/human-connections/google/google-sheets-individual/action-copy-range.md).

# Action: Copy Range

<p align="center"><a class="button primary" data-icon="circle-caret-right">Try @Human</a><a class="button primary" data-icon="check">Buy @Human Subscriptions</a><a class="button primary" data-icon="comments">Join @Human Community</a></p>

<figure><img src="/files/auAzkjCWGFak171PMqGd" alt=""><figcaption></figcaption></figure>

<p align="center">The Copy Range action duplicates a selected range of cells to another location.</p>

{% embed url="<https://www.youtube.com/watch?v=CyuUuaBSZzA>" %}

#### Example User Story

I want to copy a range of cells from one location to another within a Google Sheet so that I can efficiently reorganize my data.

#### Fields

| Field Name             | Field Type | Required | Description                                                     |
| ---------------------- | ---------- | -------- | --------------------------------------------------------------- |
| spreadsheetId          | String     | Yes      | The spreadsheet containing the source and destination ranges.   |
| sourceSheetId          | Integer    | Yes      | Sheet ID of the source range (0 = first sheet).                 |
| sourceStartRowIndex    | Integer    | Yes      | First row of the source range (0-based, inclusive).             |
| sourceEndRowIndex      | Integer    | Yes      | Last row of the source range (0-based, exclusive).              |
| sourceStartColumnIndex | Integer    | Yes      | First column of the source range (0-based, inclusive).          |
| sourceEndColumnIndex   | Integer    | Yes      | Last column of the source range (0-based, exclusive).           |
| destSheetId            | Integer    | Yes      | Sheet ID of the destination range (0 = first sheet).            |
| destStartRowIndex      | Integer    | Yes      | First row of the destination range (0-based, inclusive).        |
| destEndRowIndex        | Integer    | Yes      | Last row of the destination range (0-based, exclusive).         |
| destStartColumnIndex   | Integer    | Yes      | First column of the destination range (0-based, inclusive).     |
| destEndColumnIndex     | Integer    | Yes      | Last column of the destination range (0-based, exclusive).      |
| pasteType              | String     | No       | The type of paste operation to perform. Default: PASTE\_NORMAL. |

> **Example:** To copy `Sheet1!A1:C1` → `Sheet1!A11:C11`: rows 0→1, cols 0→3 (source) and rows 10→11, cols 0→3 (destination), both sheetId=0.

### Related Connections

[Google Sheets](/human-connections/google/google-sheets-individual.md)

### Related Automations

Example link

### Code (Apache v2.0): Operation

```
{
  "handle": "copy-range",
  "state": "inDev",
  "meta": {
    "short": "Copy Range",
    "description": "Copies a range of cells from one location to another within a Google Sheet."
  },
  "input": [
    {
      "name": "spreadsheetId",
      "type": "String",
      "required": true,
      "meta": {
        "description": "The spreadsheet to operate on."
      }
    },
    {
      "name": "sourceSheetId",
      "type": "Integer",
      "required": true,
      "meta": {
        "description": "Sheet ID of the source range (0 = first sheet)."
      }
    },
    {
      "name": "sourceStartRowIndex",
      "type": "Integer",
      "required": true,
      "meta": {
        "description": "First row of the source range (0-based, inclusive)."
      }
    },
    {
      "name": "sourceEndRowIndex",
      "type": "Integer",
      "required": true,
      "meta": {
        "description": "Last row of the source range (0-based, exclusive)."
      }
    },
    {
      "name": "sourceStartColumnIndex",
      "type": "Integer",
      "required": true,
      "meta": {
        "description": "First column of the source range (0-based, inclusive)."
      }
    },
    {
      "name": "sourceEndColumnIndex",
      "type": "Integer",
      "required": true,
      "meta": {
        "description": "Last column of the source range (0-based, exclusive)."
      }
    },
    {
      "name": "destSheetId",
      "type": "Integer",
      "required": true,
      "meta": {
        "description": "Sheet ID of the destination (0 = first sheet)."
      }
    },
    {
      "name": "destStartRowIndex",
      "type": "Integer",
      "required": true,
      "meta": {
        "description": "First row of the destination (0-based, inclusive)."
      }
    },
    {
      "name": "destEndRowIndex",
      "type": "Integer",
      "required": true,
      "meta": {
        "description": "Last row of the destination (0-based, exclusive)."
      }
    },
    {
      "name": "destStartColumnIndex",
      "type": "Integer",
      "required": true,
      "meta": {
        "description": "First column of the destination (0-based, inclusive)."
      }
    },
    {
      "name": "destEndColumnIndex",
      "type": "Integer",
      "required": true,
      "meta": {
        "description": "Last column of the destination (0-based, exclusive)."
      }
    },
    {
      "name": "pasteType",
      "type": "String",
      "meta": {
        "default": "PASTE_NORMAL",
        "description": "The type of paste operation to perform.",
        "options": [
          "PASTE_NORMAL",
          "PASTE_VALUES",
          "PASTE_FORMAT",
          "PASTE_NO_BORDERS",
          "PASTE_FORMULA",
          "PASTE_DATA_VALIDATION",
          "PASTE_CONDITIONAL_FORMATTING"
        ]
      }
    }
  ],
  "output": [
    {
      "name": "spreadsheetId",
      "type": "String",
      "selector": [
        "spreadsheetId"
      ],
      "meta": {
        "description": "The ID of the spreadsheet the operation was applied to."
      }
    }
  ],
  "steps": [
    {
      "type": "http",
      "http": {
        "method": "POST",
        "path": {
          "value": "/{{spreadsheetId}}:batchUpdate"
        },
        "headers": {
          "Content-Type": {
            "value": "application/json"
          }
        },
        "bodyTemplate": {
          "value": "{\"requests\":[{\"copyPaste\":{\"source\":{\"sheetId\":{{sourceSheetId}},\"startRowIndex\":{{sourceStartRowIndex}},\"endRowIndex\":{{sourceEndRowIndex}},\"startColumnIndex\":{{sourceStartColumnIndex}},\"endColumnIndex\":{{sourceEndColumnIndex}}},\"destination\":{\"sheetId\":{{destSheetId}},\"startRowIndex\":{{destStartRowIndex}},\"endRowIndex\":{{destEndRowIndex}},\"startColumnIndex\":{{destStartColumnIndex}},\"endColumnIndex\":{{destEndColumnIndex}}},\"pasteType\":\"{{pasteType}}\"}}]}",
          "placeholders": [
            {
              "name": "pasteType",
              "type": "String",
              "description": "",
              "required": false,
              "default": "PASTE_NORMAL"
            }
          ]
        }
      }
    }
  ]
}
```

<p align="center"><a class="button primary" data-icon="square-caret-right">Try @Human</a><a class="button primary" data-icon="check">Buy @Human Subscription</a><a class="button primary" data-icon="comments">Join @Human Community</a></p>


---

# 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:

```
GET https://docs.planetcrust.com/human-connections/google/google-sheets-individual/action-copy-range.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
