Class TableColumn
表列
表格中的列。列由表单元格列表组成。列由列编号标识。
详细文档
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
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
getWidth()
返回列的宽度(以点为单位)。
返回
Number
授权
使用此方法的脚本需要获得以下一个或多个范围的授权:
-
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
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-12-03。
[null,null,["最后更新时间 (UTC):2024-12-03。"],[[["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 `TableColumn` represents a column in a table, composed of `TableCell`s, identified by its index. Key actions include retrieving a specific cell via `getCell(cellIndex)`, obtaining the column's index with `getIndex()`, and determining the number of cells using `getNumCells()`. Other methods include getting the parent table via `getParentTable()`, getting the column's width in points using `getWidth()`, and removing the column using `remove()`. Removal may lead to the deletion of the entire table.\n"]]