Merge branch 'MDL-53973-tablelib-worksheet-name' of https://github.com/brendanheywood/moodle

This commit is contained in:
Andrew Nicols
2016-04-29 12:17:58 +01:00
committed by Dan Poltawski
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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);
}
+1 -1
View File
@@ -1730,7 +1730,6 @@ class table_dataformat_export_format extends table_default_export_format_parent
$this->filename = $filename;
$this->documentstarted = true;
$this->dataformat->set_filename($filename);
$this->dataformat->send_http_headers();
}
/**
@@ -1740,6 +1739,7 @@ class table_dataformat_export_format extends table_default_export_format_parent
*/
public function start_table($sheettitle) {
$this->dataformat->set_sheettitle($sheettitle);
$this->dataformat->send_http_headers();
}
/**