Class PivotGroupLimit

  • PivotGroupLimit allows you to programmatically control the limits applied to pivot table groups in Google Sheets.

  • You can access and modify the count limit of rows or columns within a pivot group using methods like getCountLimit and setCountLimit.

  • The PivotGroupLimit class provides methods to retrieve the associated pivot group (getPivotGroup) and remove the limit entirely (remove).

  • All methods within PivotGroupLimit require authorization with specific scopes, such as https://www.googleapis.com/auth/spreadsheets.

PivotGroupLimit

Access and modify pivot table group limit.

Methods

MethodReturn typeBrief description
getCountLimit()IntegerGets the count limit on rows or columns in the pivot group.
getPivotGroup()PivotGroupReturns the pivot group the limit belongs to.
remove()voidRemoves the pivot group limit.
setCountLimit(countLimit)PivotGroupLimitSets 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://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets

getPivotGroup()

Returns the pivot group the limit belongs to.

Return

PivotGroup — The pivot group.

Authorization

Scripts that use this method require authorization with one or more of the following 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://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

NameTypeDescription
countLimitIntegerThe count limit on rows or columns to set. Must be positive.

Return

PivotGroupLimit — The pivot group limit, for chaining.

Authorization

Scripts that use this method require authorization with one or more of the following scopes:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets