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 - 行的索引(从 0 开始)。

授权

使用此方法需要获得以下一个或多个范围的授权的脚本:

  • 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