Skip to content

[MYSQL-IMPORT-003] Support Excel sheet, header, and empty-cell options #2602

Description

@openai0229

What needs to be done

Extend XLS and XLSX import with visible-sheet listing, single-sheet selection, configurable starting row and header row, and an explicit empty-cell rule for empty string versus SQL NULL. Refresh the bounded preview immediately when an option changes and show typed previews for dates, numbers, booleans, and cached formula results.

Acceptance criteria

  • A multi-sheet workbook imports only the selected visible sheet.
  • Introductory rows can be skipped and the selected header names feed the column-mapping flow.
  • Blank and missing cells follow the selected empty-string or SQL NULL rule in both preview and import.
  • Dates, large numbers, booleans, and cached formula results do not drift solely because of preview formatting.
  • A damaged workbook or workbook without an available sheet fails before any database write.

Compatibility and constraints

Support MySQL 5.7 and 8.0 and both XLS and XLSX. Parsing is client-side and storage-engine independent. Read only a locally selected file, never execute workbook formulas, use only cached formula results with an explicit marker, and do not log preview data. Do not import multiple sheets at once, execute macros, add a formula engine, or preserve Excel styling. This feature uses the preview and mapping model from MYSQL-IMPORT-001.

Tests and test data

Add automated tests for XLS and XLSX, multiple sheets, introductory rows, custom headers, blank and missing cells, dates, large numbers, booleans, cached formulas, damaged workbooks, and bounded large-file preview. Provide repeatable init.sql, grants.sql, cleanup.sql, and README.md files plus deterministic workbook fixtures covering every case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status
    In Review

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions