AI-generated Key Takeaways
-
A TableColumn represents a column within a Google Slides table, comprised of a list of TableCells and identified by its column index.
-
Developers can access and manipulate TableColumns using methods like getCell(), getIndex(), getNumCells(), getParentTable(), getWidth(), and remove().
-
These methods allow for retrieving specific cells, determining column index and size, identifying the parent table, and removing the column entirely.
-
Each method requires specific authorization scopes, typically 'https://www.googleapis.com/auth/presentations.currentonly' or 'https://www.googleapis.com/auth/presentations', to interact with Google Slides presentations.
-
Removing a TableColumn with merged cells may remove common spanned columns and potentially the entire table if no columns remain.
A column in a table. A column consists of a list of table cells. A column is identified by the column index.
Methods
Method | Return type | Brief description |
---|---|---|
get | Table | Returns the cell at the specified index. |
get | Integer | Returns the 0-based index of the column. |
get | Integer | Returns the number of cells in this column. |
get | Table | Returns the table containing the current column. |
get | Number | Returns the width of the column in points. |
remove() | void | Removes the table column. |
Detailed documentation
getCell(cellIndex)
Returns the cell at the specified index.
Parameters
Name | Type | Description |
---|---|---|
cell | Integer | The 0-based index of the cell to retrieve. |
Return
Authorization
Scripts that use this method require authorization with one or more of the following scopes:
-
https://www.googleapis.com/auth/presentations.currentonly
-
https://www.googleapis.com/auth/presentations
getIndex()
Returns the 0-based index of the column.
Return
Integer
Authorization
Scripts that use this method require authorization with one or more of the following scopes:
-
https://www.googleapis.com/auth/presentations.currentonly
-
https://www.googleapis.com/auth/presentations
getNumCells()
Returns the number of cells in this column.
Return
Integer
Authorization
Scripts that use this method require authorization with one or more of the following scopes:
-
https://www.googleapis.com/auth/presentations.currentonly
-
https://www.googleapis.com/auth/presentations
getParentTable()
getWidth()
Returns the width of the column in points.
Return
Number
Authorization
Scripts that use this method require authorization with one or more of the following scopes:
-
https://www.googleapis.com/auth/presentations.currentonly
-
https://www.googleapis.com/auth/presentations
remove()
Removes the table column.
If all the cells in the column are merged with other columns, the common columns spanned by these cells are removed.
If no columns remain in the table after this removal, the whole table is removed.
Authorization
Scripts that use this method require authorization with one or more of the following scopes:
-
https://www.googleapis.com/auth/presentations.currentonly
-
https://www.googleapis.com/auth/presentations