WarUI

CSV import with column mapping

GRID-A20-F18P0baselinePlanned

Imports a CSV file through a guided dialog: parse, preview, then map file columns to grid columns using automatic matching that the user can override. Mapping prevents silent misalignment when file headers differ from grid fields.

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

Live example

Empty contacts grid with an 'Import' button and sample files to pick from.

Expected behavior

The dialog shows the first 20 parsed rows and suggested mappings. Confirming imports the rows into the grid, and unmapped file columns are ignored.

Planned API surface

importData()openImportDialog()importOptions.format='csv'importOptions.mappingimportOptions.autoMapimportOptions.hasHeaderimportOptions.delimiter ('auto' supported)column.importAliases

Acceptance criteria

  • Auto-detect identifies comma, semicolon, tab and pipe delimiters on the sample files. (pending)
  • autoMap matches case-insensitively on field, header and importAliases, ignoring punctuation. (pending)
  • Each grid column can be mapped at most once, and conflicts are flagged. (pending)
  • importData({file, mapping}) works headlessly without the dialog. (pending)
  • A BOM is stripped and quoted multi-line fields are parsed correctly. (pending)