• Resolved aboivin

    (@aboivin)


    Hi,

    Im trying to export some data to CSV, so that it can then be imported into google sheets. More specifically, I want to export a string that would already be pre-formated for google sheet’s image function

    For this, im using the function editor and made something as such :

    <?php
    
    function gsheet_image($value){
    	return "=image(\"".$value."\",4,150,150)";
    }
    ?>

    And then calling this on the field I am exporting. Overall, it -almosts- works, but for some reason, the export prepends a single quote at the beginning, meaning that it does not work in sheets anymore

    It looks like :
    ‘=image(“{url}”,4,150,150)
    instead of just
    =image(“{url}”,4,150,150)

    Im unsure as to why this happens. Ive tried a couple of different ways, but it either isnt outputing an equal sign, and when it is, then its always prepended with a quote, breaking formating for gsheet

    Any fix / idea ?

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Function editor prepends quote to equal sign’ is closed to new replies.