Skip to content

ExportMode

Controls how cell values are produced for export.

  • 'raw' — underlying values straight from the row (i.e. what resolveCellValue returns). No display formatting applied. Use when you want underlying typed values (Dates stay Dates, numbers stay numbers) — ideal for handing rows to a third-party serializer. This matches the behavior of today’s exportCsv / exportExcel / exportJson.

  • 'formatted' — applies display formatting where available: column-type default formatter → column.format(value, row). When a format function is found the result is coerced to string (the same string the cell renders); for typed columns without a custom format the value may stay typed (e.g. boolean columns coerce to true/false, date columns use formatDateValue). processCell runs last and may return any type, so the final cell value is processCell(formattedValue, ...) when one is provided.

Default: 'raw' — preserves current export behavior exactly. Opt in to displayed values per call with { mode: 'formatted' }.

type ExportMode = "raw" | "formatted"
AI assistants: For complete API documentation, implementation guides, and code examples for this library, see https://raw.githubusercontent.com/OysteinAmundsen/toolbox/main/llms-full.txt