Some people use arbitrary softer and change the separator. It will be nice to enable easy change of the CSV separator being used.
A good enough solution will be to add a global configuration for the module, that will hold the desired separator value.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ndobromirov’s picture

Title: Change the CSV separator to be ';' instead of ',' » Solution version 1
FileSize
2.27 KB

Sending a patch that adds a module configuration with a selectbox to to chouse between ',' and ';'.

Kevin Hankens’s picture

I like this a lot! The only recommendations I might have are:

- maybe use a text field for the separator value that could accommodate more than just , and ;
- I'm wondering if we would want a module-specific permission for that admin page. I'm 50/50 on this one.

Thanks!!

ndobromirov’s picture

Title: Solution version 1 » Solution version 2
FileSize
3.03 KB

Hi,

The following changes are introduced from the previous patch:

1. Changed the form field type to textfield.
2. Added simple validation.
3. Added more phpdoc comments.
4. Added custom permission that will allow the configuration management.

Best regards,
Nikolay Dobromirov.

Kevin Hankens’s picture

Title: Solution version 2 » Add a user configurable CSV separator
Status: Active » Needs review

Awesome, this is perfect. I have one or two other things to test, but I'll get this in sometime this week.

Kevin Hankens’s picture

Bernsch’s picture

Version: 7.x-2.x-dev » 7.x-2.2

Sorry, i dont finde the configuartion to use configurable CSV separator ";" or ","
I update from 2.1 to 2.2 and when i upload a CSV file with ";" the tabletext is alway in one colum!
I have the same proplem from this: #1862486: CSV import - result is always one column
Can you help me pleace?

Bernsch’s picture

Status: Closed (fixed) » Needs review
ndobromirov’s picture

Configuration can be found in: DOMAIN/admin/config/content/tablefield .
You must be logged in user with "configure tablefield" permissions for one of his roles (at least).

Bernsch’s picture

Status: Needs review » Closed (fixed)

Ahhh! :-) OK, i see ist! Thanks!

jorisx’s picture

Nice! was looking for this :)

Maybe is it possible to add this option per node or field ?
So a content editor with these rights can config the 'separator' / delimiter while editing content..
And is it possible to add mac line-endings? :)

Super great module!
Thanks