Skip to content

Fix: Normalize Excel date cells to YYYY-MM-DD format (#243)#255

Open
vasanth2929 wants to merge 1 commit intotableflowhq:mainfrom
vasanth2929:fix/excel-date-normalization-243
Open

Fix: Normalize Excel date cells to YYYY-MM-DD format (#243)#255
vasanth2929 wants to merge 1 commit intotableflowhq:mainfrom
vasanth2929:fix/excel-date-normalization-243

Conversation

@vasanth2929
Copy link

Problem

When reading Excel files:

  • Some date cells (t: "d") are parsed as raw numbers instead of Date.
  • Display strings (cell.w) are inconsistent across environments (slashes vs dashes).
  • This leads to mismatches between Excel UI and the xlsx parser.

Solution

  • Normalizes date cells (t: "d") into the consistent ISO string format YYYY-MM-DD using XLSX.SSF.format.
  • Skips non-cell metadata keys (!ref, !margins, etc).

Tests

  • Verified against .xlsx files containing Date columns.
  • Before: some dates rendered as raw numbers (e.g., 35994).
  • After: all date cells consistently render as YYYY-MM-DD.

Fixes #243

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Excel date import issues, dates being turned into numbers

2 participants