Rideful

Tables

Your AI assistant creates tables on your slides, fills them, and changes their rows, columns, merges, formatting, widths and style — all with one atomic tool.

A table is created in two steps, as a chart is: element_bulk_create makes an empty table the way the editor's Insert Table makes one, then element_update_table fills and styles it — and edits it later, imported tables included. Tables draw in the editor and export as real PowerPoint tables.

A client connected before tables arrived keeps its old tool list: start a fresh session to see element_update_table. For other element types, see Element Operations; for data visualizations, see Charts.

Creating a Table

A table element in element_bulk_create takes its grid and, optionally, its box. Any other field is refused, naming it, and rows and columns on another element type are refused too.

FieldTypeRequiredDescription
elementType"table"YesSet on the element inside elements[]
rows, columnsnumberYesWhole numbers, 1–75
x, ynumberNoTop-left in px. Give both, or neither to centre the table on the slide; one alone is refused
widthnumberNoThe table's width, its columns even. Without one, ⅔ of the slide's width
heightnumberNoRows share it evenly but never shrink below one empty line, so a height that is too small comes out taller. Without one, each row is one line tall
groupId, morphKeystringNoAs on any element
  • Style — PowerPoint's default, Medium Style 2 – Accent 1 (medium-style-2-accent-1), with Header Row and Banded Rows on, bound to the slide's own master.
  • Result — the entry's position and size are the box the table came to.
  • Slides only — a table on a layout is refused with Layouts cannot hold tables — create the table on a slide. element_create and slide_bulk_create's extra elements don't create tables.

Example — a comparison table

// 1. Create the table — empty, in PowerPoint's default style
element_bulk_create({
  deckId: "deck_abc123",
  slideId: "slide_002",
  elements: [
    {
      elementType: "table",
      rows: 4, columns: 3,
      x: 80, y: 180,
      width: 1120
    }
  ]
})

// Response:
// Created 1 element(s) on slide
//   [0] table (4 × 3) at (80, 180) 1120×154 — empty; fill it with element_update_table (z:3)
// The structured result carries the table's elementId, "table-Ka1bZ9mQ" here

// 2. Fill it, right-align the numbers and pick a style, in one call
element_update_table({
  deckId: "deck_abc123",
  elementId: "table-Ka1bZ9mQ",
  operations: [
    { op: "setCells", cells: [
      { row: 1, column: 1, text: "Plan" },
      { row: 1, column: 2, text: "Price" },
      { row: 1, column: 3, text: "Seats" },
      { row: 2, column: 1, text: "Starter" },
      { row: 2, column: 2, text: "$12" },
      { row: 2, column: 3, text: "1" },
      { row: 3, column: 1, text: "Team" },
      { row: 3, column: 2, text: "$49" },
      { row: 3, column: 3, text: "10" },
      { row: 4, column: 1, text: "Business" },
      { row: 4, column: 2, text: "$199" },
      { row: 4, column: 3, text: "Unlimited" }
    ] },
    { op: "format",
      from: { row: 2, column: 2 }, to: { row: 4, column: 3 },
      textAlign: "right" },
    { op: "style", style: "medium-style-2-accent-2" }
  ]
})

element_update_table

One call runs 1–50 operations in order, against deckId and the table's elementId, from slide_get or the element_bulk_create result. Each operation runs the editor's own function, so it behaves as the same action in the editor does.

OperationFieldsWhat it does
setCellscells: [{ row, column, text }] (1–5,625)Replaces each cell's text with text's markdown. "" empties the cell
insertRowsbefore or after, count?Inserts count rows (default 1) above or below a row; set exactly one of before and after. New rows copy the formatting and height of the row beside them, and a merge the insertion crosses grows over them
insertColumnsbefore or after, count?The same for columns, left or right of one
deleteRowsfrom, to?Deletes rows from to to (default from). A merge crossing them shrinks
deleteColumnsfrom, to?The same for columns
mergefrom: { row, column }, to: { row, column }Merges the rectangle into one cell, every cell's text joined in reading order
unmergerow, columnSplits the merged cell holding that slot back into its cells; any slot of the merge names it
formatfrom?, to?, textAlign?, verticalAlign?, fontSize?, textColor?, fontFamily?Sets cells' alignment, size, colour or face, as the text toolbar does. Neither corner formats every cell, from alone one cell, both the rectangle, grown to hold any merge it cuts
columnWidthswidths: number[]Sets every column's width in px, one per column as the table stands at that point. Their sum is the table's new width
stylestyle?, headerRow?, totalRow?, bandedRows?, firstColumn?, lastColumn?, bandedColumns?Picks a built-in style by slug, sets Table Design's options, or both

textAlign is left, center, right or justify; verticalAlign is top, middle or bottom; fontSize is in points (1–400); textColor is #RRGGBB. A table holds at most 75 rows and 75 columns.

Example — add and fill a Total row

// Add a Total row, merge its first two cells, fill it,
// and turn on Table Design's Total Row option
element_update_table({
  deckId: "deck_abc123",
  elementId: "table-Ka1bZ9mQ",
  operations: [
    { op: "insertRows", after: 4 },
    { op: "merge",
      from: { row: 5, column: 1 }, to: { row: 5, column: 2 } },
    { op: "setCells", cells: [
      { row: 5, column: 1, text: "Total" },
      { row: 5, column: 3, text: "**11+**" }
    ] },
    { op: "style", totalRow: true }
  ]
})

// Response:
// Updated table table-Ka1bZ9mQ: 5 rows × 3 columns, 1120×192 px

Addressing

  • Rows and columns count from 1, as slide_get prints Row 1. In detail: "full", cells[r-1][c-1] is row r, column c.
  • Operations see each other — each one addresses the table as the one before it left it, so insertRows { after: 3 } then setCells on row 4 adds a row and fills it in one call.
  • Merged cells — slide_get prints a merged cell with its span, "Total" (spans 2 columns), and every other slot it covers as (merged). Write the merged cell at its top-left; a setCells entry or a format corner on a (merged) slot is refused, naming the merged cell.
  • Outside the grid — row 6 of a 5-row table is refused, naming the table's size.

How slide_get prints a table

- table-Ka1bZ9mQ: table (5 rows × 3 columns) "Medium Style 2 – Accent 2" (medium-style-2-accent-2) at (80, 180) 1120×192
  Options: header row, total row, banded rows
  Row 1: "Plan" | "Price" | "Seats"
  Row 2: "Starter" | "$12" | "1"
  Row 3: "Team" | "$49" | "10"
  Row 4: "Business" | "$199" | "Unlimited"
  Row 5: "Total" (spans 2 columns) | (merged) | "11+"
  Edit it with element_update_table: rows and columns count from 1, as printed.

What a Write Keeps

  • setCells takes the same markdown as text elsewhere — bold, italic, lists and <span style> runs. It replaces the cell's text and keeps the cell's alignment, size, colour and face, its line and paragraph spacing, and the first paragraph's own attributes. Bold and italic follow the table style, so a header row is bold without markup; the markdown can set bold or italic, never turn them off. Markup that can't apply is reported under ignoredStyles and ignoredTags.
  • format sets its keys on each cell. fontSize, fontFamily and textColor also replace the sizes, faces and colours the cells' text sets on its own, as a toolbar change does — including spans an earlier setCells in the same call wrote. To keep a span, put its setCells after the format.
  • style clears cells' own fill and borders, as picking a style in PowerPoint's Table Design does. Naming the table's current style changes nothing.

Table Styles

A style is named by its slug: its English gallery name in lowercase, each run of other characters a hyphen. Medium Style 2 – Accent 1 is medium-style-2-accent-1; No Style, No Grid is no-style-no-grid. The accent number picks the theme colour, so medium-style-2-accent-2 follows the deck's accent 2. The tools list all 74 slugs as an enum:

SectionSlugs
Themedno-style-no-grid, no-style-table-grid, themed-style-1-accent-1 to -6, themed-style-2-accent-1 to -6
Lightlight-style-1, light-style-2 and light-style-3, each also -accent-1 to -accent-6
Mediummedium-style-1 to medium-style-4, each also -accent-1 to -accent-6
Darkdark-style-1 and dark-style-1-accent-1 to -6; dark-style-2, dark-style-2-accent-1-accent-2, dark-style-2-accent-3-accent-4, dark-style-2-accent-5-accent-6

slide_get prints a table's slug after its style name. The slug follows the style itself, so an imported table that calls the default “Estilo medio 2 - Énfasis 1” still reads medium-style-2-accent-1. A style defined only in an imported file has no slug (styleSlug: null), and any slug replaces it. The options keep Table Design's names: headerRow, totalRow, bandedRows, firstColumn, lastColumn and bandedColumns.

The Result

The structured result is { elementId, rows, columns, position, size, offSlide?, ignoredStyles?, ignoredTags? }. Rows grow and shrink to fit their text and the table's top-left stays put, so size is the box the table came to. offSlide is { right?, bottom? }, the pixels the table runs past the slide's edge, present only when it does; the text result adds a warning line. Fix an overrun before moving on: shorten the text, set a smaller fontSize with format, or move or resize the table with element_bulk_update.

Refusals

A refused operation discards the whole call, the operations before it included, and the message names it:

  • operations[1] (setCells): row 2, column 3 is inside the merged cell at row 2, column 2; write that cell
  • operations[0] (setCells): row 6 is past the table's 5 rows
  • operations[0] (insertRows): set exactly one of before and after
  • operations[0] (insertRows): inserting 2 rows makes 76; a table holds at most 75 rows
  • operations[0] (deleteRows): that deletes every row, and with it the table; use element_delete
  • operations[0] (merge): the merged cell at row 2, column 1 (spans 2 rows) crosses the rectangle's edge; widen the rectangle to hold it, or unmerge it first
  • operations[0] (merge): from and to name the same cell; name two corners that span more than one
  • operations[0] (unmerge): row 2, column 2 is not a merged cell
  • operations[0] (format): set at least one of textAlign, verticalAlign, fontSize, textColor, fontFamily
  • operations[0] (columnWidths): widths has 2 entries; the table has 3 columns at this point
  • operations[0] (columnWidths): column 1's width 8 is under its minimum of 23.2 px

A table over 512 KB after the write is refused too. element_update_table on another element type is refused with Element is not a table — use element_bulk_update for other element types.

Moving, Resizing and Deleting

element_bulk_update moves, resizes or restacks a table: it takes only x, y, width, height and zIndex. Any other field refuses the call with a table's cells, rows, columns and style change through element_update_table; element_bulk_update moves, resizes or restacks it., followed by the fields it refused. A resize scales the columns and rows but never shrinks a row below its text. element_delete, element_duplicate, element_group and slide_duplicate work on a table as on any element.

Not Yet

  • Cell fill, borders and margins — no tool sets them, and neither does the editor yet. A style sets a table's fills and borders.
  • Row heights — rows fit their text. For a taller table, resize it with element_bulk_update.
  • Images or icons in cells — a cell holds text only: use a symbol such as ✓ or ✗. Never lay shapes or text boxes out as a table or over a cell, since they don't move or refit with it.

Related

  • Tables — Insert, paste and edit tables yourself in the editor
  • Slide Operations — Use slide_get to read a table's cells, spans and style slug
  • Element Operations — Create elements, and move, resize or delete a table
  • Export to PowerPoint — Tables export as native PowerPoint tables with their style