• Resolved designemotions

    (@designemotions)


    Hello,
    why in csv the values ​​are in quotes? I see that the format is this:

    “Value1”, “value2”, “value3 …..

    I need a cleaner file, values ​​separated by a semicolon, how can this be done? Thank you

    I would like it this way:

    value1; value2; value3 ……

    Thank you

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Doeke Norg

    (@doekenorg)

    Hi @designemotions,

    This is actually done to prevent errors where content contains these special characters. There is a strict CSV standard, and this result follows that standard.

    I might be able to add a hook to overwrite this behavior, but I would strongly suggest you don’t change it.

    Can I ask what the use case is?

    Thread Starter designemotions

    (@designemotions)

    A company asked me if it is possible to have the file in that format because it is then processed by an application within the company to reprocess the data and automatically generate estimates for customers who fill out the form. Then that format is reworked by an application developed for the need

    Thanks

    Plugin Author Doeke Norg

    (@doekenorg)

    @designemotions ok. Let me get back to you in this!

    Plugin Author Doeke Norg

    (@doekenorg)

    Hi @designemotions,

    I’ve just released version 1.7.5 for you. It contains a few new hooks for you to change the behavior of the CSV.

    The hooks are:
    gfexcel_renderer_csv_delimiter -> default: ,
    gfexcel_renderer_csv_enclosure -> default: "
    gfexcel_renderer_csv_line_ending -> default: PHP_EOL
    gfexcel_renderer_csv_use_bom -> default: false
    gfexcel_renderer_csv_include_seperator_line -> default: false

    You can add something like this to your functions.php:

    // changes CSV delimiter to a semicolon
    add_filter('gfexcel_renderer_csv_delimiter', static function() {
        return ';';
    });

    Please let me know if this helps you out enough.

    Plugin Author Doeke Norg

    (@doekenorg)

    Closed due to inactivity. If you need any more help, please let me know.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Quotes in csv and semicolon’ is closed to new replies.