Skip to main content
AI Global CenterCREATE. CONNECT. DISCOVER.
Code & automation

How should a CSV importer handle two columns with the same name?

Noah Hale

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]

Sora Nakamura

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.