[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-07-26 (世界標準時間)。"],[[["\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`"]]