Actions40
- Create Bullets Request Actions
- Create Document Request Actions
- Create Headers & Footers Request Actions
- Create Images Request Actions
- Create Named Ranges Request Actions
- Create Tables Request Actions
- Create Tabs Request Actions
- Create Text Request Actions
- Send Request Actions
Create Tables Request → Insert Table
AI-generatedSummary
Creates a new table at a specific location in a Google Doc with a specified number of rows and columns.
Inputs
- Rows — The number of rows in the table (default: 1).
- Columns — The number of columns in the table (default: 1).
- Index (required) — The zero-based index in UTF-16 code units relative to the beginning of the segment specified by segmentId.
- Segment ID — The ID of the header, footer, or footnote the location is in. An empty ID signifies the document's body.
- Tab ID — The tab that the location is in. If omitted, the request applies to the first tab.
- Insertion Location — The type of location for insertion: 'location' (specific index) or 'endOfSegmentLocation' (end of segment).
Output shape
No body — returns the executed request (success/failure).
The operation is part of a batch update. It does not return table data but executes the request to insert the table into the document.
Examples
Example 1: Insert a 3x3 table at the beginning of the document body.
Index: 0, Rows: 3, Columns: 3
Example 2: Insert a table at the end of the document.
Insertion Location: End of Segment Location