table
Hierarchy: presentation > slides > shapes
Like the textbox shape, the table shape is used to display simple text or numerical data.
data_cells
Object
[optional] 2-dimensional array of cell values. See data cell object for more information.
settings
Object
[optional] An array of shape-level settings. See settings object for more information.
is_hidden
Boolean
true; false
[optional] Hide shape
remove
Boolean
true; false
[optional] Delete shape
JSON payload
"shapes": [
{
"name": "string",
"data_cells": [],
"settings": [],
"is_hidden": boolean,
"remove": boolean
},
{
"name": "string",
"data_cells": [],
"settings": [],
"is_hidden": boolean,
"remove": boolean
}
]data_cells object
The data_cells object defines the content of a table shape.
It is a two-dimensional array, where each inner array represents a row, and each element within that row represents a cell.
Each cell can be either:
a string (for plain text), or
an object (for rich text and formatting).
text
String or Object
[optional] Text to display in the textbox.
- String: A simple way to display plain text.
- Object: Use for advanced formatting by defining text chunks. See the text object structure.
cell_properties
Object
[optional] A cell styling object
JSON payload
"data_cells": [
[
"Cell A1",
"Cell B1",
"Cell C1"
],
[
"Cell A2",
{
"text": [
{
"text_run": "Cell",
"text_properties": {...}
},
{
"text_run": " B2",
"text_properties": {...}
}
],
"cell_properties": {...}
},
"Cell C2"
],
[
"Cell A3",
"Cell B3",
"Cell C3"
]
]`text` Object
An array of text objects, where each object represents a part of the text with its own text content and optional properties.
text_run
String
[required] Text chunk
text_properties
Object
[optional] A text styling object. List of font styling parameters to override existing styles for the given chunk of text.
JSON Payload
"text": [
{
"text_run": "This is part 1 of my sentence.",
"text_properties": {}
},
{
"text_run": "This is part 2 of my sentence.",
"text_properties": {}
}
]text_properties
Text format properties.
font_size
Integer
1 to 4000
[optional] Font size
font_bold
Boolean
true; false
[optional] Bold
font_italic
Boolean
true; false
[optional] Italic
text_indent
Integer
0 to 142.24
[optional] Set text indent
text_align
String
left,
center,
right,
justified,
dist
[optional] Set text alignment
font_underline
String
single;
double;
heavy;
dotted
heavydotted;
dashed;
heavydashed;
heavylongdashed;
dotdash;
heavydotdash;
heavydotdotdash;
wavy;
heavywavy;
doublewavy;
[optional] Various text underline
text_line_spacing
Integer
1 to 1584
[optional] Spacing between text lines
new_line
Boolean
true; false
[required] Create new line within text box
JSON payload
"data_cells": [
[
"Cell A1",
{
"text": [
{
"text_run": "Cell B1",
"text_properties": {
"font_type": "string",
"font_size": numeric,
"font_bold": boolean,
"font_italic": boolean,
"font_color": "string",
"font_bg_color": "string",
"text_align": "string",
"text_indent": numeric,
"text_line_spacing": numeric,
"font_underline": "string",
"new_line": boolean
}
}
],
"cell_properties": {}
},
"Cell C1"
],
[
"Cell A2",
"Cell B2",
"Cell C2"
],
[
"Cell A3",
"Cell B3",
"Cell C3"
]
]cell_properties
JSON payload
"data_cells": [
[
"Cell A1",
{
"text": [
{
"text_run": "Cell B1",
"text_properties": {...}
}
],
"cell_properties": {
"bg_color": "0,128,0"
}
},
"Cell C1"
],
[
"Cell A2",
"Cell B2",
"Cell C2"
],
[
"Cell A3",
"Cell B3",
"Cell C3"
]
]Settings Object
The settings object contain a list format/styling parameters.
Parameters below are available across all shapes, regardless of type.
Some shape types (i.e. Charts, Tables, Textboxes) have specific attributes, see shape specific settings pages to learn more.
width
Integer,
Float
0 to 5963.92
[optional] Set shape width
height
Integer,
Float
0 to 5963.92
[optional] Set shape height
left
Integer,
Float
-5963.92 to 5963.92
[optional] Set left position
top
Integer,
Float
-5963.92 to 5963.92
[optional] Set top position
unit
String
cm,
pt,
points
[optional] Set unit of measurement for shape width, height, left, top. Defaults to points if not specifcied.
JSON payload
"settings": {
"height": numeric,
"width": numeric,
"top": numeric,
"left": numeric,
"unit": "string",
"fill_color": "0,0,0"
}Last updated
Was this helpful?