PowerPoint.TableAddOptions interface
Represents the available options when adding a table.
Remarks
Properties
columns | If provided, specifies properties for each column in the table. The array length must be equal to the number of columns in the table. Specify an empty object for columns that should use the default formatting. |
height | Specifies the height, in points, of the table. A default value is used when this parameter is not provided. Throws an |
left | Specifies the distance, in points, from the left side of the table to the left side of the slide. The table is centered horizontally when this parameter is not provided. |
merged |
If specified, represents an rectangular area where multiple cells appear as a single cell. |
rows | If provided, specifies properties for each row in the table. The array length must be equal to the number of rows in the table. Specify an empty object for rows that should use the default formatting. |
specific |
If provided, specifies properties for each cell in the table. This should be an 2D array with the same number of rows and columns as the table. If a cell does not require specific formatting, specify an empty object for that cell. Only the top left cell of a merged are can have properties specified, which will be applied to the entire merged area. For the other cells in the merged area, an empty object should be provided. |
top | Specifies the distance, in points, from the top edge of the table to the top edge of the slide. A default value is used when this parameter is not provided. |
uniform |
Specifies the formatting which applies uniformly to all of the table cells. To apply specific formatting to individual cells, use specificCellProperties. If both uniformCellProperties and specificCellProperties are undefined, the default formatting will be used, and the default table style will be applied. The table will have the same appearance as when the user adds a table through the PowerPoint UI. To provide a plain appearance for the table, set this property to an empty object and do not specify specificCellProperties. |
values | If provided, specifies the values for the table. When the table contains areas of merged cells, only the top left cell of each merged area can have a non-empty string value. The other cells in the merged area must be an empty string. |
width | Specifies the width, in points, of the table. A default value is used when this parameter is not provided. Throws an |
Property Details
columns
If provided, specifies properties for each column in the table. The array length must be equal to the number of columns in the table. Specify an empty object for columns that should use the default formatting.
columns?: PowerPoint.TableColumnProperties[];
Property Value
Remarks
height
Specifies the height, in points, of the table. A default value is used when this parameter is not provided. Throws an InvalidArgument
exception when set with a negative value.
height?: number | undefined;
Property Value
number | undefined
Remarks
left
Specifies the distance, in points, from the left side of the table to the left side of the slide. The table is centered horizontally when this parameter is not provided.
left?: number | undefined;
Property Value
number | undefined
Remarks
mergedAreas
If specified, represents an rectangular area where multiple cells appear as a single cell.
mergedAreas?: PowerPoint.TableMergedAreaProperties[];
Property Value
Remarks
rows
If provided, specifies properties for each row in the table. The array length must be equal to the number of rows in the table. Specify an empty object for rows that should use the default formatting.
rows?: PowerPoint.TableRowProperties[];
Property Value
Remarks
specificCellProperties
If provided, specifies properties for each cell in the table.
This should be an 2D array with the same number of rows and columns as the table. If a cell does not require specific formatting, specify an empty object for that cell. Only the top left cell of a merged are can have properties specified, which will be applied to the entire merged area. For the other cells in the merged area, an empty object should be provided.
specificCellProperties?: PowerPoint.TableCellProperties[][];
Property Value
Remarks
top
Specifies the distance, in points, from the top edge of the table to the top edge of the slide. A default value is used when this parameter is not provided.
top?: number | undefined;
Property Value
number | undefined
Remarks
uniformCellProperties
Specifies the formatting which applies uniformly to all of the table cells.
To apply specific formatting to individual cells, use specificCellProperties.
If both uniformCellProperties and specificCellProperties are undefined, the default formatting will be used, and the default table style will be applied. The table will have the same appearance as when the user adds a table through the PowerPoint UI.
To provide a plain appearance for the table, set this property to an empty object and do not specify specificCellProperties.
uniformCellProperties?: PowerPoint.TableCellProperties;
Property Value
Remarks
values
If provided, specifies the values for the table.
When the table contains areas of merged cells, only the top left cell of each merged area can have a non-empty string value. The other cells in the merged area must be an empty string.
values?: string[][];
Property Value
string[][]
Remarks
width
Specifies the width, in points, of the table. A default value is used when this parameter is not provided. Throws an InvalidArgument
exception when set with a negative value.
width?: number | undefined;
Property Value
number | undefined