// Create a named range that includes every table in the active tab.constdocumentTab=DocumentApp.getActiveDocument().getActiveTab().asDocumentTab();constrangeBuilder=documentTab.newRange();consttables=documentTab.getBody().getTables();for(leti=0;i < tables.length;i++){rangeBuilder.addElement(tables[i]);}documentTab.addNamedRange('myUniquePrefix-tables',rangeBuilder.build());
[[["易于理解","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"]],["最后更新时间 (UTC):2024-12-22。"],[[["A `NamedRange` is a named area within a Google Doc tab, retrievable using its name or unique ID, similar to HTML elements with classes and IDs respectively."],["While multiple ranges can share the same name, IDs are unique within a tab, and once a `NamedRange` is added, it can only be removed, not modified."],["`NamedRange` provides methods like `getId()`, `getName()`, `getRange()`, and `remove()` for managing and accessing the named range and its associated elements."],["Scripts can access `NamedRange` within a tab, and using unique prefixes for range names helps avoid conflicts between different scripts."],["`NamedRange` methods might require specific authorization scopes for accessing and manipulating document content."]]],[]]