Class PivotGroupLimit
Stay organized with collections
Save and categorize content based on your preferences.
PivotGroupLimit
Access and modify pivot table group limit.
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
Name | Type | Description |
countLimit | Integer | The 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
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-12-02 UTC.
[null,null,["Last updated 2024-12-02 UTC."],[[["\u003cp\u003e\u003ccode\u003ePivotGroupLimit\u003c/code\u003e allows you to programmatically control the limits applied to pivot table groups in Google Sheets.\u003c/p\u003e\n"],["\u003cp\u003eYou can access and modify the count limit of rows or columns within a pivot group using methods like \u003ccode\u003egetCountLimit\u003c/code\u003e and \u003ccode\u003esetCountLimit\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ePivotGroupLimit\u003c/code\u003e class provides methods to retrieve the associated pivot group (\u003ccode\u003egetPivotGroup\u003c/code\u003e) and remove the limit entirely (\u003ccode\u003eremove\u003c/code\u003e).\u003c/p\u003e\n"],["\u003cp\u003eAll methods within \u003ccode\u003ePivotGroupLimit\u003c/code\u003e require authorization with specific scopes, such as \u003ccode\u003ehttps://www.googleapis.com/auth/spreadsheets\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Class PivotGroupLimit\n\nPivotGroupLimit\n\nAccess and modify pivot table group limit. \n\n### Methods\n\n| Method | Return type | Brief description |\n|------------------------------------------------------|--------------------------------------------------------------|-------------------------------------------------------------|\n| [getCountLimit()](#getCountLimit()) | `Integer` | Gets the count limit on rows or columns in the pivot group. |\n| [getPivotGroup()](#getPivotGroup()) | [PivotGroup](/apps-script/reference/spreadsheet/pivot-group) | Returns the pivot group the limit belongs to. |\n| [remove()](#remove()) | `void` | Removes the pivot group limit. |\n| [setCountLimit(countLimit)](#setCountLimit(Integer)) | [PivotGroupLimit](#) | Sets the count limit on rows or columns in the pivot group. |\n\nDetailed documentation\n----------------------\n\n### `get``Count``Limit()`\n\nGets the count limit on rows or columns in the pivot group.\n\n#### Return\n\n\n`Integer` --- The count limit on rows or columns.\n\n#### Authorization\n\nScripts that use this method require authorization with one or more of the following [scopes](/apps-script/concepts/scopes#setting_explicit_scopes):\n\n- `https://www.googleapis.com/auth/spreadsheets.currentonly`\n- `https://www.googleapis.com/auth/spreadsheets`\n\n*** ** * ** ***\n\n### `get``Pivot``Group()`\n\nReturns the pivot group the limit belongs to.\n\n#### Return\n\n\n[PivotGroup](/apps-script/reference/spreadsheet/pivot-group) --- The pivot group.\n\n#### Authorization\n\nScripts that use this method require authorization with one or more of the following [scopes](/apps-script/concepts/scopes#setting_explicit_scopes):\n\n- `https://www.googleapis.com/auth/spreadsheets.currentonly`\n- `https://www.googleapis.com/auth/spreadsheets`\n\n*** ** * ** ***\n\n### `remove()`\n\nRemoves the pivot group limit.\n\n#### Authorization\n\nScripts that use this method require authorization with one or more of the following [scopes](/apps-script/concepts/scopes#setting_explicit_scopes):\n\n- `https://www.googleapis.com/auth/spreadsheets.currentonly`\n- `https://www.googleapis.com/auth/spreadsheets`\n\n*** ** * ** ***\n\n### `set``Count``Limit(countLimit)`\n\nSets the count limit on rows or columns in the pivot group.\n\n#### Parameters\n\n| Name | Type | Description |\n|----------------|-----------|--------------------------------------------------------------|\n| `count``Limit` | `Integer` | The count limit on rows or columns to set. Must be positive. |\n\n#### Return\n\n\n[PivotGroupLimit](#) --- The pivot group limit, for chaining.\n\n#### Authorization\n\nScripts that use this method require authorization with one or more of the following [scopes](/apps-script/concepts/scopes#setting_explicit_scopes):\n\n- `https://www.googleapis.com/auth/spreadsheets.currentonly`\n- `https://www.googleapis.com/auth/spreadsheets`"]]