Class TableRow

TableRow

表中的行。行由一系列表格单元格组成。行由行索引进行标识。

方法

方法返回类型简介
getCell(cellIndex)TableCell返回指定索引处的单元格。
getIndex()Integer返回从 0 开始的行索引。
getMinimumHeight()Number返回行的高度下限(以点为单位)。
getNumCells()Integer返回此行中单元格的数量。
getParentTable()Table返回包含当前行的表格。
remove()void移除表格行。

详细文档

getCell(cellIndex)

返回指定索引处的单元格。

参数

名称类型说明
cellIndexInteger要检索的单元格的索引(从 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