Print

JCI and Google Spreadsheet

Situation:

You have a Google spreadsheet with data. Publish this Spreadshirt as CSV.
With that, you get something like
https://docs.google.com/spreadsheets/d/e/2PACX-1vSUBoYuyFoVPKnD-9sQUEZTbsXvVnoL5A-ydgsdKzw3DSfadYAINI834ZRsgRfSZdTGM99vs4yOty6D/pub?gid=0&single=true&output=csv

Show this data:

Create a JCI-Template with

name: googlespreadsheet

URL: see above

Curl options:

CURLOPT_FOLLOWLOCATION=TRUE

Twig-template:

<table border=1>
{% for k,v in _parent %}
    <tr>
        {% for i in 0..((v | length)-1) %}
            {% set out = attribute(v, i) %}
            <td>{{out}}</td>
        {% endfor %}
    </tr>
{% endfor %}
</table>

Shortcode:

[jsoncontentimporterpro nameoftemplate=googlespreadsheet inputtype=csv inputtypeparam='{"delimiter": ",", "enclosure": "#QM#", "escape":"#BS#", "csvline": "#LF#", "skipempty": "yes"}']
Was this article helpful?
0 out Of 5 Stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
5
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.
On this page: