Returning Observer

Export data source as csv

Hey community,
is it possible to export a data set in FirstSpririt for example as csv file?

Thanks for hints!

0 Kudos
1 Reply
New Creator

Yes it is possible. You must create overview page in Page template(in properties tab, change extension from html to csv)

After that in html tab you create function to access data source. Something like this:

<CMS_FUNCTION name="contentSelect" resultname="fr_content">

  <CMS_PARAM name="schema" value="referenceNameSchema" />

  <QUERY entityType="referenceNameForTable"/>



     $CMS_SET(set_header,["ID","Language","Other fields"])$



               $CMS_FOR(sv_lang, #global.project.languages)$

                   $CMS_SET(#global.language, sv_lang)$


                    $CMS_SET(void, set_values.add(if(!,,"null")))$

                   $CMS_SET(void, set_values.add(sv_lang))$






After this in Page content insert new page(page from page template).Open it and you get csv.

0 Kudos