Skip to content

Bug: Excel import mistakes blank first-row cells for missing header columns and rejects valid later rows #3582

Closed

Description

@yannickmonney

Found during the local Tale fleet audit. P2 · confirmed parser defect.

Source: 44e0dcf254975286c0e9dea443b5cd1ca6b23347. No production testing or writes.

A blank value in the first data row prevents all valid rows from importing, contradicting per-row partial-import behavior and optional numeric defaults.

Reproduce:

  1. Products workbook: actual headers name,price,stock; first data row Blank amounts with empty price/stock; second row Full amounts,12,3.
  2. Contacts workbook: actual headers email,name; first data row lacks email; second row [email protected],Valid contact.
  3. Pass actual generated XLSX bytes through parseImportFile.

Expected: Product workbook imports2 rows, optional blank amounts default0; contact workbook imports the valid row and reports row2 blank-email refusal.

Observed: Both whole files rejected with Missing required column(s) because headerKeys is inferred from Object.keys(records[0].record), and SheetJS omits blank cells from that record.

The assigned auditor and independent parent rerun both executed the production parser and import mappers with actual SheetJS-generated CSV/XLSX bytes. The browser file picker and database import were not exercised. The local Bun FileReader adapter only delivered File bytes to the existing callbacks.

Reproduction output:

{
  "id": "XLSX_BLANK_FIRST_ROW",
  "expected": {
    "records": 2,
    "firstPrice": 0,
    "firstStock": 0
  },
  "actual": {
    "data": [],
    "rows": [],
    "errors": [
      "Missing required column(s): price, stock. Found columns: name."
    ],
    "rowErrors": []
  }
}

Source locations:

Acceptance: Read required columns from the actual worksheet header, independently of values in its first data row. Import valid later rows and return per-row validation errors; cover both products and contacts.

Deduplication: #1312: Old missing-column data-loss issue; current valid header misidentified from first row values.; #1323: Same related legacy column validation root, not exact blank-cell false rejection.

Local evidence: tale-100-findings/settings-import-probe.ts and settings-import-parent-rerun.log in the audit notes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugservice: platform

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions