Expands and adds {data} to a table. By default, the data is always replaced when the function is triggered. Use the mode parameter to change this behavior.

Table Log

Parameter List


The {data} to be expanded.

[optional] attributes

A range or JSON list of attributes to be expanded. Provide an array formatted as '["attribute",...]' or a range. For example: A1:A4 or '["name","age"]'. By default, the function considers all attributes available on data.

[optional] mode

The table behavior mode. The default value is 0. The function adds new headers, keeps existing ones and overwrites the content of the table. Use 1 to replace every column and row required to build the table. Use 2 to upsert data. Modes 3, 4, and 5 prevent the function from executing when data sources are invalid. Those keep the same behavior of 0, 1, and 2, respectively.

[optional] keys

Provide an array formatted as '["key1","key2"]' or a range. This list of keys defines whether a row/column should be added or updated. keys should be used along with mode 2.

[optional] transpose

Change the orientation of the table. Use TRUE to rotate the table. By default, this field assumes the FALSE option.


EXPAND(A1, '["name","city"]', 2, '["name"]', FALSE) returns expands and updates the `name` and `city` columns.