// The code below deletes all the named ranges in the spreadsheet.constnamedRanges=SpreadsheetApp.getActive().getNamedRanges();for(leti=0;i < namedRanges.length;i++){namedRanges[i].remove();}
// The code below updates the name for the first named range.constnamedRanges=SpreadsheetApp.getActiveSpreadsheet().getNamedRanges();if(namedRanges.length > 1){namedRanges[0].setName('UpdatedNamedRange');}
[[["容易理解","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"]],["上次更新時間:2024-12-22 (世界標準時間)。"],[[["Named ranges provide string aliases for cell ranges within a spreadsheet, enhancing readability and simplifying formulas."],["You can manage named ranges through the Sheets UI under \"Data \u003e Named ranges...\" or programmatically using Apps Script methods."],["Apps Script offers methods to create, access, modify, and delete named ranges, including `getName()`, `getRange()`, `remove()`, `setName()`, and `setRange()`."],["These methods enable you to retrieve and update the name and range associated with a named range, as well as delete it entirely."],["Authorization is required to utilize these methods, necessitating specific scopes like `https://www.googleapis.com/auth/spreadsheets`."]]],["Named ranges in spreadsheets can be managed using provided methods. You can retrieve a named range's name using `getName()`, or its associated range using `getRange()`. To modify, use `setName(name)` to change the named range's alias and `setRange(range)` to assign it a new range. To delete the range use `remove()`. These actions require spreadsheet authorization scopes. The UI location is in **Data \u003e Named ranges...** menu.\n"]]