HTABLE
Returns an HTML table string from an array of objects using the selected fields and optional header labels.
Syntax
HTABLE(rows, fields, headers)
Arguments
rows: An array of objects to render as table rows.
fields: A list of object field names to include in the table, in display order.
headers: Optional list of header labels to show in the first row. If omitted, the field names are used.
Example
HTABLE(
{{Line Items}},
["item", "qty", "rate", "total"],
["Item", "Qty", "Rate", "Total"]
)
→ Returns:
<table><tr><td><strong>Item</strong></td><td><strong>Qty</strong></td><td><strong>Rate</strong></td><td><strong>Total</strong></td></tr><tr><td>P4 Outdoor Customized</td><td></td><td></td><td>0</td></tr><tr><td>P4 Outdoor Customized</td><td>20</td><td>45</td><td>5205</td></tr></table>
HTABLE(A1, ["name", "amount"])
→ Returns an HTML table using the name and amount f