can I force the csv enclosure character to appear for all fields?

(5 posts) (2 voices)
  1. gabem, Member

    Is there a way to make the csv enclosure character to appear around all data in a csv export file? It appears that the field is only enclosed with the enclosure character when the delimiter character appears in the data.

    Thanks in advance,

    Gabe

  2. myDBR Team, Key Master

    Gabe,
    run the updater. We added an export option csv.enclose_always. Same option can also be set to be on by default in user/defaults.php by overriding the respective value from defaults.php.

    --
    myDBR Team

  3. gabem, Member

    Thanks for the very quick response!

    Testing with v3.9.1 build 2033, the csv.enclose_always option seems to be working for all strings but numeric values are not enclosed

    I am using comma delimited, double quote enclosure:

    select 'dbr.export.options', 'csv.delimiter', ',';
    select 'dbr.export.options', 'csv.header', 0;
    select 'dbr.export.options', 'csv.enclosure', '"';
    select 'dbr.export.options', 'csv.enclose_always', 1;

    Thanks,

    Gabe

  4. myDBR Team, Key Master

    We've included numbers into csv.enclose_always option in the latest build.

    --
    myDBR Team

  5. gabem, Member

    This works perfectly now. Thank you for the quick fixes.


Reply

You must log in to post.