Skip to content

Commit

Permalink
MDL-37753 dataformat: Only set worksheet name where implemented
Browse files Browse the repository at this point in the history
  • Loading branch information
brendanheywood authored and danpoltawski committed Apr 29, 2016
1 parent c32bcfe commit dae2198
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/classes/dataformat/spout_base.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function send_http_headers() {
$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);
}
Expand Down

0 comments on commit dae2198

Please sign in to comment.