WarUI

Spreadsheet formula injection neutralization on export

GRID-A29-F10P0beyond-baselinePlanned

CSV and XLSX exports neutralize cells that begin with =, +, -, @, tab, or carriage return by prefixing a single quote or by storing them as typed text. This stops untrusted data from executing as formulas in spreadsheet apps.

Planned. This page shows the specification from issue #209. The live example, source for every framework and the API reference replace it when the feature ships.

Live example

Rows containing formula payloads, legitimate negative numbers, and phone numbers starting with +.

Expected behavior

The preview shows guarded cells prefixed or typed as text. True numeric columns still export -42 as a number. Choosing 'off' shows a warning banner.

Planned API surface

exportCsvexportXlsxexportOptions.formulaGuard: 'prefix' | 'typed-text' | 'off'exportOptions.allowFormulaColumnsonExportCellGuarded

Acceptance criteria

  • Guarding is on by default with 'prefix' for CSV and 'typed-text' for XLSX. (pending)
  • Numeric-typed columns export numbers without a prefix. (pending)
  • Leading whitespace before the trigger character is handled. (pending)
  • CSV quoting is RFC 4180 compliant after guarding. (pending)
  • onExportCellGuarded reports row, column, and original value. (pending)