TAGS
Converts a table with headers and rows into a JSON object array. There should be a "label" column and each row is rendered as a hoverable tag with that label.
Syntax
TAGS(table, [spillover])
Arguments
| Argument |
Description |
Required |
table |
The table array where the first row contains headers and subsequent rows contain data |
Required |
spillover |
Optional. TRUE/FALSE, 1/0, or text starting with "spill". Default FALSE returns one JSON string; TRUE spills one tag per row. |
Optional |
Examples
Convert table to JSON objects
=TAGS(A1:C3)
Result ⇒
[{"Name":"John","Age":"25","City":"NYC"},{"Name":"Jane","Age":"30","City":"LA"}]
| Name |
Age |
City |
| John |
25 |
NYC |
| Jane |
30 |
LA |
Product catalog to JSON
=TAGS(A1:B3)
Result ⇒
[{"Product":"Widget","Price":"9.99"},{"Product":"Gadget","Price":"19.99"}]
| Product |
Price |
| Widget |
9.99 |
| Gadget |
19.99 |
Employee data transformation
=TAGS(A1:B3)
Result ⇒
[{"ID":"1","Department":"Sales"},{"ID":"2","Department":"Marketing"}]
| ID |
Department |
| 001 |
Sales |
| 002 |
Marketing |
Spillover array output
=TAGS(A1:C3, TRUE)
Result ⇒
{"Name":"John","Age":"25","City":"NYC"}
| Name |
Age |
City |
| John |
25 |
NYC |
| Jane |
30 |
LA |
Related Functions
Other Special Functions & Keywords functions:
- CELL - Current cell value in criteria formulas
- COL - Column value using COL[A] or COL[1] syntax
- CSV - Serializes a table to a high-precision CSV string (CRLF between rows). Trailing empty rows and columns are cropped; internal blanks are kept. Wrap the cell or increase row height to see every line.
- FROMCSV - Parses a high-precision CSV string into a spilled table. Inverse of CSV.
- FROMTAG - Extracts a field value from a single JSON tag object produced by TAG or TAGS spillover.
- ONCE - Returns the value of the inner formula and only executes once, turning the cell into a value
- ONCHANGE - Returns initial_value until the range changes, then returns value_after_change and converts the cell to a static value
- RECORDID - Salesforce record ID for this workbook
- TAG - Converts a 2-column key|value table (default) or 2-row key|value table into a single JSON tag object.
- USERID - Current logged-in user's ID
← Back to Formula Reference