Class 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