An exported spreadsheet contains two columns called “Date.” Mapping the header to an object key silently loses one. I want the person importing it to be able to keep both columns.
In my small test file one Date is the invoice date and the other is the shipping date. A blank header separates them. If the imported row is keyed by the visible word, one value disappears before the user sees a mapping screen. What should the preview label say?
Date,,Date → [0,1,2]
Keep the column index as its internal identity. Show the original headers with their positions and let the person map either one in the import preview.
Sora NakamuraKeep the column index as its internal identity. Show the original headers with their positions and let the person map either one in the import preview.
Add a case with an empty header between the duplicates. A useful check is that exporting immediately after import keeps the original order and both values.
Sora NakamuraKeep the column index as its internal identity. Show the original headers with their positions and let the person map either one in the import preview.
I would show “Date · column 1” and “Date · column 3” in the picker while storing positions 0 and 2 internally. That leaves the actual heading untouched for export, even if somebody later renames its visible label.
[0] 2026-06-08
[2] 2026-06-12
Eva ParkAdd a case with an empty header between the duplicates. A useful check is that exporting immediately after import keeps the original order and both values.
Don't just check the header row after exporting. Put two deliberately different dates in one data row, reopen the new CSV and make sure both values remain in their original positions. Some importers fix labels but lose the second value.
Date,,Date
2026-06-08,,2026-06-12
Kwame BellI would show “Date · column 1” and “Date · column 3” in the picker while storing positions 0 and 2 internally. That leaves the actual heading untouched for export, even if somebody later re…
I’d show the first nonempty sample under each option. Both columns are dates, but the shipping date is later in this sample, which gives the person mapping the file a second clue. The program should still ask which is which.
[0] → invoice_date
[2] → ship_date