public function getExcelBook($file_format = self::FILE_FORMAT_XLSX, $locale = 'UTF-8')
    {
        //@codeCoverageIgnoreStart
        if (!extension_loaded('excel')) {
            throw new Exception\RuntimeException(__METHOD__ . ' LibXL requires excel extension (https://github.com/iliaal/php_excel) and http://libxl.com/.');
        }
        //@codeCoverageIgnoreEnd
        if (!$this->isSupportedFormat($file_format)) {
            throw new Exception\InvalidArgumentException(__METHOD__ . " Unsupported file format '$file_format'.");
        }

        $license = $this->getLicense();
        $license_name = $license['name'];
        $license_key = $license['key'];
        $excel2007 = true;
        switch ($file_format) {
            case self::FILE_FORMAT_XLS:
                $excel2007 = false;
                break;
        }

        $book = new ExcelBook($license_name, $license_key, $excel2007);
        if ($locale !== null) {
            $book->setLocale($locale);
        }
        return $book;
    }