diff --git a/src/Bundle/ChillMainBundle/Export/Formatter/SpreadSheetFormatter.php b/src/Bundle/ChillMainBundle/Export/Formatter/SpreadSheetFormatter.php index 330231f8e..45d85d8aa 100644 --- a/src/Bundle/ChillMainBundle/Export/Formatter/SpreadSheetFormatter.php +++ b/src/Bundle/ChillMainBundle/Export/Formatter/SpreadSheetFormatter.php @@ -443,10 +443,16 @@ class SpreadSheetFormatter implements FormatterInterface, ExportManagerAwareInte $original = $this->export->getTitle(); if ($original instanceof TranslatableInterface) { - return $original->trans($this->translator, $this->translator->getLocale()); + $title = $original->trans($this->translator, $this->translator->getLocale()); + } else { + $title = $this->translator->trans($original); } - return $this->translator->trans($original); + if (30 < strlen($title)) { + return substr($title, 0, 30).'…'; + } + + return $title; } protected function initializeCache($key)