Class TableRow
TableRow
表格中的一行。行由表单元格列表组成。行由行索引标识。
详细文档
getCell(cellIndex)
返回指定索引处的单元格。
参数
名称 | 类型 | 说明 |
cellIndex | Integer | 要检索的单元格的索引(从 0 开始)。 |
返回
TableCell
- 单元格。
授权
使用此方法的脚本需要获得以下一个或多个范围的授权:
-
https://www.googleapis.com/auth/presentations.currentonly
-
https://www.googleapis.com/auth/presentations
getIndex()
返回行的索引(从 0 开始)。
返回
Integer
授权
使用此方法的脚本需要获得以下一个或多个范围的授权:
-
https://www.googleapis.com/auth/presentations.currentonly
-
https://www.googleapis.com/auth/presentations
getMinimumHeight()
返回行的最小高度(以点为单位)。实际高度取决于单元格内容的长度。
返回
Number
授权
使用此方法的脚本需要获得以下一个或多个范围的授权:
-
https://www.googleapis.com/auth/presentations.currentonly
-
https://www.googleapis.com/auth/presentations
getNumCells()
返回此行中的单元格数。
返回
Integer
授权
使用此方法的脚本需要获得以下一个或多个范围的授权:
-
https://www.googleapis.com/auth/presentations.currentonly
-
https://www.googleapis.com/auth/presentations
getParentTable()
返回包含当前行的表。
返回
Table
授权
使用此方法的脚本需要获得以下一个或多个范围的授权:
-
https://www.googleapis.com/auth/presentations.currentonly
-
https://www.googleapis.com/auth/presentations
remove()
移除表格行。
如果该行中的所有单元格都与其他行合并,则系统会移除这些单元格所跨越的公共行。
如果移除后表中没有剩余行,则系统会移除整个表。
授权
使用此方法的脚本需要获得以下一个或多个范围的授权:
-
https://www.googleapis.com/auth/presentations.currentonly
-
https://www.googleapis.com/auth/presentations
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-12-02。
[null,null,["最后更新时间 (UTC):2024-12-02。"],[[["A `TableRow` represents a row within a table in Google Slides, comprised of a list of table cells and identified by its index."],["Developers can access and manipulate `TableRow` objects using methods like `getCell()`, `getIndex()`, `getMinimumHeight()`, `getNumCells()`, `getParentTable()`, and `remove()`."],["`TableRow` methods allow for retrieving specific cells, obtaining row properties (index, minimum height, number of cells), accessing the parent table, and removing the row entirely."],["Using these methods requires authorization with specific scopes related to Google Presentations."]]],["A table row, identified by its index, contains a list of cells. Key actions include: retrieving a specific cell by its index (`getCell`), obtaining the row's index (`getIndex`), getting the minimum row height (`getMinimumHeight`), determining the number of cells (`getNumCells`), finding the parent table (`getParentTable`), and removing the row (`remove`). Removing a row may also remove merged or even the whole table if necessary. Accessing these methods requires specific authorization scopes.\n"]]