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
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-12-02 (世界標準時間)。
[null,null,["上次更新時間: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"]]