PowerPoint.TableColumnCollection class
Represents a collection of table columns.
- Extends
Remarks
Properties
context | The request context associated with the object. This connects the add-in's process to the Office host application's process. |
items | Gets the loaded child items in this collection. |
Methods
add(index, count) | Adds one or more columns to the table. |
delete |
Deletes the specified columns from the collection. |
get |
Gets the number of columns in the collection. |
get |
Gets the column using its zero-based index in the collection. |
load(options) | Queues up a command to load the specified properties of the object. You must call |
load(property |
Queues up a command to load the specified properties of the object. You must call |
load(property |
Queues up a command to load the specified properties of the object. You must call |
toJSON() | Overrides the JavaScript |
Property Details
context
The request context associated with the object. This connects the add-in's process to the Office host application's process.
context: RequestContext;
Property Value
items
Gets the loaded child items in this collection.
readonly items: PowerPoint.TableColumn[];
Property Value
Method Details
add(index, count)
Adds one or more columns to the table.
add(index?: number | null | undefined, count?: number | undefined): void;
Parameters
- index
-
number | null | undefined
Optional. Specifies the zero-based index where the new columns are added. Existing columns starting at the index location are shifted right. If the index value is undefined, null, -1, or greater than the number of columns in the table, the new columns are added at the end of the table.
- count
-
number | undefined
Optional. The number of columns to add. If the value is undefined or 0, only one column is added.
Returns
void
Remarks
deleteColumns(columns)
Deletes the specified columns from the collection.
deleteColumns(columns: PowerPoint.TableColumn[]): void;
Parameters
- columns
An array of TableColumn
objects representing the columns to be deleted.
Returns
void
Remarks
getCount()
Gets the number of columns in the collection.
getCount(): OfficeExtension.ClientResult<number>;
Returns
OfficeExtension.ClientResult<number>
The number of columns in the collection.
Remarks
getItemAt(index)
Gets the column using its zero-based index in the collection.
getItemAt(index: number): PowerPoint.TableColumn;
Parameters
- index
-
number
Index value of the column to be retrieved, as a zero-based index.
Returns
The column object.
Remarks
load(options)
Queues up a command to load the specified properties of the object. You must call context.sync()
before reading the properties.
load(options?: PowerPoint.Interfaces.TableColumnCollectionLoadOptions & PowerPoint.Interfaces.CollectionLoadOptions): PowerPoint.TableColumnCollection;
Parameters
- options
-
PowerPoint.Interfaces.TableColumnCollectionLoadOptions & PowerPoint.Interfaces.CollectionLoadOptions
Provides options for which properties of the object to load.
Returns
load(propertyNames)
Queues up a command to load the specified properties of the object. You must call context.sync()
before reading the properties.
load(propertyNames?: string | string[]): PowerPoint.TableColumnCollection;
Parameters
- propertyNames
-
string | string[]
A comma-delimited string or an array of strings that specify the properties to load.
Returns
load(propertyNamesAndPaths)
Queues up a command to load the specified properties of the object. You must call context.sync()
before reading the properties.
load(propertyNamesAndPaths?: OfficeExtension.LoadOption): PowerPoint.TableColumnCollection;
Parameters
- propertyNamesAndPaths
- OfficeExtension.LoadOption
propertyNamesAndPaths.select
is a comma-delimited string that specifies the properties to load, and propertyNamesAndPaths.expand
is a comma-delimited string that specifies the navigation properties to load.
Returns
toJSON()
Overrides the JavaScript toJSON()
method in order to provide more useful output when an API object is passed to JSON.stringify()
. (JSON.stringify
, in turn, calls the toJSON
method of the object that's passed to it.) Whereas the original PowerPoint.TableColumnCollection
object is an API object, the toJSON
method returns a plain JavaScript object (typed as PowerPoint.Interfaces.TableColumnCollectionData
) that contains an "items" array with shallow copies of any loaded properties from the collection's items.
toJSON(): PowerPoint.Interfaces.TableColumnCollectionData;