Skip to main content
googleSheets.updateTable() changes a native table’s name, range, columns, or native table colors.

Example

Inputs

Provide spreadsheet, an existing table name or ID, and at least one update:
  • name: a new table name
  • range: a complete structured range with sheet and optional one-based inclusive row and column bounds
  • columns: a complete replacement array. Each column needs a name and a type: unspecified, number, currency, percent, date, time, dateTime, text, boolean, dropdown, file, person, finance, place, or rating. Only dropdown columns accept and require options.
  • style: one or more headerColor, firstBandColor, or secondBandColor updates
A style color is a six-digit hex string or { theme } using text, background, accent1 through accent6, or link. Set a style property to null to restore its default. Google doesn’t reliably support adding or removing native table footers later. Second argument { account } selects the Google Account.

Output

Returns the current { tableId, name, range, columns, style }. When replacing columns, align their count with the target range and existing data.