# SpreadsheetClearCellRange

Clears the specified cell range of all styles and values.

## Method Signature

```
SpreadsheetClearCellRange(spreadsheetObj=[any], startRow=[any], startColumn=[any], endRow=[any], endColumn=[any])
```

### Arguments

| Argument         | Type      | Required | Description                           | Default |
| ---------------- | --------- | -------- | ------------------------------------- | ------- |
| `spreadsheetObj` | `ANY`     | `true`   | The spreadsheet object.               |         |
| `startRow`       | `NUMERIC` | `true`   | The starting row number (1-based).    |         |
| `startColumn`    | `NUMERIC` | `true`   | The starting column number (1-based). |         |
| `endRow`         | `NUMERIC` | `true`   | The ending row number (1-based).      |         |
| `endColumn`      | `NUMERIC` | `true`   | The ending column number (1-based).   |         |

## Examples

Clear a range of cells:

```js
// Clear cells A1:C5
var spreadsheet = SpreadsheetNew();
SpreadsheetAddRows( spreadsheet, [ ["A", "B", "C"], ["1", "2", "3"] ] );
SpreadsheetClearCellRange( spreadsheet, 1, 1, 5, 3 );
```

Reset section of spreadsheet:

```js
// Clear data range but keep headers
var spreadsheet = SpreadsheetRead( "/path/to/file.xlsx" );
SpreadsheetClearCellRange( spreadsheet, 2, 1, 100, 10 );  // Clear rows 2-100, columns 1-10
```

## Related

* [SpreadsheetClearCell()](/boxlang-+-++/modules/bx-spreadsheet/built-in-functions/spreadsheetclearcell.md) - Clear a single cell
* [SpreadsheetDeleteRows()](/boxlang-+-++/modules/bx-spreadsheet/built-in-functions/spreadsheetdeleterows.md) - Delete rows
* [SpreadsheetDeleteColumns()](/boxlang-+-++/modules/bx-spreadsheet/built-in-functions/spreadsheetdeletecolumns.md) - Delete columns


---

# Agent Instructions: 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://boxlang.ortusbooks.com/boxlang-+-++/modules/bx-spreadsheet/built-in-functions/spreadsheetclearcellrange.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.
