When to use it
Use tags for values that must come from a record, conditional rows or columns, repeated line items, monthly or category columns, safe links, images, and QR codes. Use Excel formulas for workbook calculations and use KayanOS expressions for choosing data and structure. Keep approval logic in governed fields rather than hiding business decisions inside a formula or tag.Configuration
Scalar cells and Excel types
An ordinary scalar tag is{{ expression }}. When it is the only content in a cell, the result is stored using an Excel number, Boolean, blank, or text type. When it appears beside other text, the complete result is text.
=, +, -, or @ remain text; a data value cannot become a new formula. Existing formulas are preserved and reference rewriting respects relative, absolute, and mixed references. External workbook references and three-dimensional sheet references are rejected when an AI operation proposes a formula.
Vertical row loops and conditions
Row control markers occupy dedicated rows. The marker cell must be the only non-empty cell in that entire row.Horizontal column loops and conditions
Horizontal repetition useseachCol, not each. The opening and closing markers occupy dedicated columns, and each marker must be the only non-empty cell in its column.
ifCol, elseCol, and /ifCol for conditional columns:
Cartesian matrices
A row loop and a column loop may cross. KayanOS evaluates them independently and creates a Cartesian matrix. For example, a row loop over departments crossed with a column loop over months produces one row per department and one column per month. Inside the crossing cell, both aliases are available.Hide, link, image, and QR directives
The renderer recognizes these directives:
Rich directives should occupy a complete cell. Image bytes are bounded, normalized to PNG, and stored in workbook media parts. Drawing anchors move with expanded rows and columns. Never encode secrets in a QR code or place credentials in an image URL.
Formulas, ranges, and preserved structures
When expansion moves a formula cell, KayanOS tokenizes its A1 references and applies Excel mixed-reference semantics. It also rewrites merged cells, data validation ranges, tables, chart formulas, drawings, defined names, print areas, and other supported range-bearing structures. The workbook is marked for full calculation on open because the service does not evaluate Excel formulas itself.Print and PDF setup
Configure page orientation, margins, print area, fit-to-width, repeated titles, and manual page breaks in the source workbook. PDF conversion uses the rendered workbook; it does not invent print settings. For wide horizontal loops, landscape orientation and an intentional fit-to-width value are usually required. Test Arabic and other RTL content in both cell view and printed output.Context and bounded lookups
Managed entity rendering supplies$record, $relations, $inverseRelations, $organization, $member, and $now. Use stored keys, not translated labels. Helpers such as getRecords are bounded and run under caller or approved admin access. Every lookup must have an explicit small limit. The renderer enforces row, image, output-size, and timeout limits before a generated workbook can exhaust service resources.
Worked example
A project office creates a budget matrix. Projects repeat down rows and quarters repeat across columns. The source has one project body row, one quarter body column, a total formula, a chart series, and a landscape print area. The author useseach around the project row and eachCol around the quarter column, then references both aliases in the crossing amount cell.
@hideColumn.
Testing
Troubleshooting
Permissions and data-quality limits
Tag expressions do not grant data access. Caller mode uses the requesting member’s scope; admin mode requires explicit configuration and narrow allowed entities. The package reader rejects macros, ActiveX, embedded objects, external workbook links, path traversal, excessive entry counts, excessive uncompressed size, and dangerous compression ratios. Structural expansion is bounded by loop, nesting, cell, image, output, and timeout limits. These protections cannot judge whether a total is conceptually correct, whether a column should be disclosed, or whether a chart is misleading. Review the source data, formulas, labels, blank-state behavior, and recipient permissions as part of release approval.Related guides
- Manage versions, actions, and AI approval in Spreadsheet templates.
- Learn shared expressions in Expression language syntax.
- Build stable record structures in Entities.
- Configure action logic in Form actions, logic, and signatures.

