public function outputWithHeaders($filename='worksheet')
    {
        $filename = preg_replace('/[^aA-zZ0-9\_\-]/', '', $filename);

        header("Content-Type: application/msexcel; charset=" . $this->encoding);
        header("Content-Disposition: inline; filename=\"" . $filename . ".xlsx\"");
        echo $this->__toString();
    }