pptx_add_table
Add a table to a PowerPoint slide. Specify position and size, optionally fill cells with data.
Instructions
Add a table to a slide.
When data is None the table is created with every cell
empty (VAL-PPTX-047). When data is shorter than
rows x cols the missing cells are padded with empty strings
(VAL-PPTX-048). All cell values are coerced to str before
being written.
Args:
path: Path to an existing .pptx.
rows: Number of rows (must be > 0; VAL-PPTX-050).
cols: Number of columns (must be > 0).
x: Left edge in inches.
y: Top edge in inches.
w: Width in inches.
h: Height in inches.
slide: 0-based slide index (VAL-PPTX-049).
folder: Optional base folder for relative paths.
data: Optional 2D list of cell values, row-major.
Returns:
{"shape_index": <int>} — 0-based index of the new table
within the slide's shape list.
Raises:
OfficeMCPError: ERR_INVALID_PARAMS for non-positive
rows / cols (VAL-PPTX-050), out-of-range
slide (VAL-PPTX-049), or non-numeric geometry;
ERR_FILE_NOT_FOUND if the file is missing;
ERR_UNSUPPORTED_FMT for non-.pptx extensions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| rows | Yes | ||
| cols | Yes | ||
| x | Yes | ||
| y | Yes | ||
| w | Yes | ||
| h | Yes | ||
| slide | No | ||
| folder | No | ||
| data | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||