Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#3 | csv-separator-configuration-2048279-3.patch | 3.03 KB | ndobromirov |
#1 | csv-separator-configuration-2048279-1.patch | 2.27 KB | ndobromirov |
Comments
Comment #1
ndobromirov CreditAttribution: ndobromirov commentedSending a patch that adds a module configuration with a selectbox to to chouse between ',' and ';'.
Comment #2
Kevin Hankens CreditAttribution: Kevin Hankens commentedI 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!!
Comment #3
ndobromirov CreditAttribution: ndobromirov commentedHi,
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.
Comment #4
Kevin Hankens CreditAttribution: Kevin Hankens commentedAwesome, this is perfect. I have one or two other things to test, but I'll get this in sometime this week.
Comment #5
Kevin Hankens CreditAttribution: Kevin Hankens commentedhttp://drupalcode.org/project/tablefield.git/commit/7afc0ed41478af953759...
Thanks!
Comment #6
Bernsch CreditAttribution: Bernsch commentedSorry, 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?
Comment #7
Bernsch CreditAttribution: Bernsch commentedComment #8
ndobromirov CreditAttribution: ndobromirov commentedConfiguration 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).
Comment #9
Bernsch CreditAttribution: Bernsch commentedAhhh! :-) OK, i see ist! Thanks!
Comment #10
jorisx CreditAttribution: jorisx commentedNice! 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