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 |
Boolean (default FALSE). If TRUE, outputs array of tags (1 per row) instead of zipped JSON string |
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
- 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
- USERID - Current logged-in user's ID
← Back to Formula Reference