PivotGroupLimit

Access and modify pivot table group limit.

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `https://developers.google.com/apps-script/reference/spreadsheet/pivot-group-limit#getCountLimit()` | `Integer` | Gets the count limit on rows or columns in the pivot group. |
| `https://developers.google.com/apps-script/reference/spreadsheet/pivot-group-limit#getPivotGroup()` | `https://developers.google.com/apps-script/reference/spreadsheet/pivot-group` | Returns the pivot group the limit belongs to. |
| `https://developers.google.com/apps-script/reference/spreadsheet/pivot-group-limit#remove()` | `void` | Removes the pivot group limit. |
| `https://developers.google.com/apps-script/reference/spreadsheet/pivot-group-limit#setCountLimit(Integer)` | `https://developers.google.com/apps-script/reference/spreadsheet/pivot-group-limit#` | Sets the count limit on rows or columns in the pivot group. |

## Detailed documentation

### `getCountLimit()`

Gets the count limit on rows or columns in the pivot group.

#### Return


`Integer` --- The count limit on rows or columns.

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/spreadsheets.currentonly`
- `https://www.googleapis.com/auth/spreadsheets`

*** ** * ** ***

### `getPivotGroup()`

Returns the pivot group the limit belongs to.

#### Return


`https://developers.google.com/apps-script/reference/spreadsheet/pivot-group` --- The pivot group.

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/spreadsheets.currentonly`
- `https://www.googleapis.com/auth/spreadsheets`

*** ** * ** ***

### `remove()`

Removes the pivot group limit.

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/spreadsheets.currentonly`
- `https://www.googleapis.com/auth/spreadsheets`

*** ** * ** ***

### `setCountLimit(countLimit)`

Sets the count limit on rows or columns in the pivot group.

#### Parameters

| Name | Type | Description |
|---|---|---|
| `countLimit` | `Integer` | The count limit on rows or columns to set. Must be positive. |

#### Return


`https://developers.google.com/apps-script/reference/spreadsheet/pivot-group-limit#` --- The pivot group limit, for chaining.

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/spreadsheets.currentonly`
- `https://www.googleapis.com/auth/spreadsheets`