Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/07/26 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Il n'y a pas l'information dont j'ai besoin","missingTheInformationINeed","thumb-down"],["Trop compliqué/Trop d'étapes","tooComplicatedTooManySteps","thumb-down"],["Obsolète","outOfDate","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Mauvais exemple/Erreur de code","samplesCodeIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/07/26 (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,["PivotGroupLimit\n\nAccess and modify pivot table group limit. \n\nMethods\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`get``Count``Limit()` \nGets the count limit on rows or columns in the pivot group.\n\nReturn\n\n\n`Integer` --- The count limit on rows or columns.\n\nAuthorization\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()` \nReturns the pivot group the limit belongs to.\n\nReturn\n\n\n[PivotGroup](/apps-script/reference/spreadsheet/pivot-group) --- The pivot group.\n\nAuthorization\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()` \nRemoves the pivot group limit.\n\nAuthorization\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)` \nSets the count limit on rows or columns in the pivot group.\n\nParameters\n\n| Name | Type | Description |\n|----------------|-----------|--------------------------------------------------------------|\n| `count``Limit` | `Integer` | The count limit on rows or columns to set. Must be positive. |\n\nReturn\n\n\n[PivotGroupLimit](#) --- The pivot group limit, for chaining.\n\nAuthorization\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`"]]