Merge branch 'MDL-53973-tablelib-worksheet-name' of https://github.com/brendanheywood/moodle
This commit is contained in:
@@ -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
@@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user