mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 20:50:21 +01:00
MDL-37753 dataformat: Only set worksheet name where implemented
This commit is contained in:
parent
c32bcfe751
commit
dae21986aa
@ -51,7 +51,7 @@ abstract class spout_base extends \core\dataformat\base {
|
||||
$this->writer = \Box\Spout\Writer\WriterFactory::create($this->spouttype);
|
||||
$filename = $this->filename . $this->get_extension();
|
||||
$this->writer->openToBrowser($filename);
|
||||
if ($this->sheettitle) {
|
||||
if ($this->sheettitle && $this->writer instanceof \Box\Spout\Writer\AbstractMultiSheetsWriter) {
|
||||
$sheet = $this->writer->getCurrentSheet();
|
||||
$sheet->setName($this->sheettitle);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user