View as Markdown

API reference

@salmonui/core/export-model

58 exported symbols: 11 functions, 39 interfaces, 7 types and 1 constant. Each name links its page with the signature, docs and members.

import { … } from '@salmonui/core/export-model';

Functions

  • createExportModelcreateExportModel(engine, options): the export model of an engine with the export module.
  • escapeCsvFormulaPrefixes ' to formula-like text; a numeric value whose text reads as a number stays as is.
  • exportCsvExports a grid (an engine with the export module, or a model) as CSV text.
  • exportFileNameFile name with the format extension (default export).
  • isExportCapableEngineTrue for an engine with the export module (as opposed to a prebuilt model).
  • resolveExportModelResolves an export source to a model.
  • runBeforeExportRaises onBeforeExport; true when the export may proceed.
  • runExportRuns one export: onBeforeExport, the model from the source and options, the writer, then onExport. Resolves to null when prevented.
  • streamCsvStreams the model as CSV chunks. Each chunk is complete lines; chunks end at chunkRows rows or after sliceMs, then the iterator awaits yield before producing t…
  • toExportModelOptionsMaps public export options and bound hooks to export model options.
  • writeCsvWrites the whole model as one CSV string.

Interfaces

Types

  • ExportAggregateCellsAggregate cells per exported column (null where a column has none).
  • ExportFormatExport formats (excel writes an .xlsx file).
  • ExportHeaderRow
  • ExportHierarchyModeDetail / hierarchy export mode (hierarchyExportMode). Reserved for the detail and tree modules.
  • ExportRow
  • ExportScopeWhich rows an export covers: - filtered (default, AllPages): every page of the current query (search, filter, sort, grouping applied). - page (CurrentPage): th…
  • ExportSourceExport model source: a prebuilt model or an engine with the export module.

Constants

  • isFormulaTextWhether a spreadsheet could read this text as a formula.