Hi,
is there any plugin or other tool to export the contents of a structure field to CSV oder XLS?
Not that iām aware of, but if you google around, PHP has a built in thing to generate CSV. You can do it from an array. Will work in a template, or via a route or something.
<?php
$list = array (
array('header 1', 'header 2', 'header 3', 'header 4'),
array('5656', '454545', '5455', '5454'),
array('541212', '454545', '5455', '5454'),
array('541212', '454545', '5455', '5454'),
);
$fp = fopen('file.csv', 'wb');
foreach ($list as $fields) {
fputcsv($fp, $fields);
}
fclose($fp);
You would have to convert the structure object first, though, i.e. get the field names for the header values, and then the actual values for the rest.