public function set_sheettitle($title) {
        if (!$title) {
            return;
        }

        // Replace any characters in the name that Excel cannot cope with.
        $title = strtr(trim($title, "'"), '[]*/\?:', '       ');
        // Shorten the title if necessary.
        $title = \core_text::substr($title, 0, 31);
        // After the substr, we might now have a single quote on the end.
        $title = trim($title, "'");

        $this->sheettitle = $title;
    }
public function set_sheettitle($title) {
        if (!$title) {
            return;
        }

        // Replace any characters in the name that Excel cannot cope with.
        $title = strtr(trim($title, "'"), '[]*/\?:', '       ');
        // Shorten the title if necessary.
        $title = \core_text::substr($title, 0, 31);
        // After the substr, we might now have a single quote on the end.
        $title = trim($title, "'");

        $this->sheettitle = $title;
    }
public function set_sheettitle ( $ title ) { if ( ! $ title ) { return ; } // Replace any characters in the name that Excel cannot cope with. $ title = strtr ( trim ( $ title , "'" ) , '[]*/\?:' , '       ' ) ; // Shorten the title if necessary. $ title = \ core_text :: substr ( $ title , 0 , 31 ) ; // After the substr, we might now have a single quote on the end. $ title = trim ( $ title , "'" ) ; $ this -> sheettitle = $ title ; }
Set the title of the worksheet inside a spreadsheet

For some formats this will be ignored.

@param string $title
Set the title of the worksheet inside a spreadsheet