active_importer icon indicating copy to clipboard operation
active_importer copied to clipboard

Ability to have multiple names for each column

Open khelal opened this issue 10 years ago • 2 comments

Hi, is it possible to have different variations of a name for each column? Something like:

    column ['unit', 'units', 'u'], :unit
    column ['note', 'notes', 'n'], :note, optional: true

khelal avatar Mar 11 '14 12:03 khelal

Interesting suggestion. Let me give it a thought about the implementation and the possible consequences.

At first, it comes to mind the fact that the column names need to be unique. It cannot happen something like:

column %w(unit units), :unit
column %w(units), :units

Also, we have to consider the possibility that, in an example like yours (column ['unit', 'units'], :unit), what if the spreadsheet file comes with a column header 'unit' and another column with header 'units'?

As a side note, this suggestion also relates to a feature I've been thinking about, that the column names should be matched disregarding case, so a column named 'first name' would match a spreadsheet column with a header like 'First Name'.

gnapse avatar Mar 11 '14 14:03 gnapse

@khelal I'm working on a fairly large rewrite of the gem, that includes this possibility. Stay tuned.

gnapse avatar Dec 27 '14 02:12 gnapse