Skip to content
This repository has been archived by the owner on Nov 23, 2021. It is now read-only.

Ability to have multiple names for each column #12

Open
khelal opened this issue Mar 11, 2014 · 2 comments
Open

Ability to have multiple names for each column #12

khelal opened this issue Mar 11, 2014 · 2 comments

Comments

@khelal
Copy link

khelal commented Mar 11, 2014

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
@gnapse
Copy link
Contributor

gnapse commented Mar 11, 2014

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
Copy link
Contributor

gnapse commented Dec 27, 2014

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants