hello,
I try to export result rows (from admin-generator) to a csv file:
public function csvExport($pager) {
...
$this->getResponse()->clearHttpHeaders();
$this->getResponse()->setHttpHeader('Content-Type', 'application/
vnd.ms-excel;charset=utf-8');
$this->getResponse()->setHttpHeader('Content-Disposition',
'attachment; filename='.$filename.'.csv');
$this->setLayout(false);
$this->setTemplate('csv');
$this->properties = array("firstname",
"lastname",
...);
$this->results = $pager->getResults();
cvsSuccess.php:
...
<?php foreach ($results as $result): ?>
<?php foreach ($properties as $property): ?><?php echo $result->get
($property); ?>;<?php endforeach; ?>
<?php endforeach; ?>
if I open the exported csv with ultraedit special characters are
displayed correctly (dos-utf8 filteype)
but when opend with ms-excel special chars are not displayed correctly
(ä -> ö )
settings.yml contains: charset: utf-8
thx for your help
--
You received this message because you are subscribed to the Google Groups
"symfony users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en.