Vendor/phpspreadsheet/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Workbook.php
private function writeBoundSheet($sheet, $offset)
    {
        $sheetname = $sheet->getTitle();
        $record = 0x0085; // Record identifier

        // sheet state
        switch ($sheet->getSheetState()) {
            case \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::SHEETSTATE_VISIBLE:
                $ss = 0x00;

                break;
            case \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::SHEETSTATE_HIDDEN:
                $ss = 0x01;

                break;
            case \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::SHEETSTATE_VERYHIDDEN:
                $ss = 0x02;

                break;
            default:
                $ss = 0x00;

                break;
        }

        // sheet type
        $st = 0x00;

        $grbit = 0x0000; // Visibility and sheet type

        $data = pack('VCC', $offset, $ss, $st);
        $data .= StringHelper::UTF8toBIFF8UnicodeShort($sheetname);

        $length = strlen($data);
        $header = pack('vv', $record, $length);
        $this->append($header . $data);
    }
private function writeBoundSheet($sheet, $offset)
    {
        $sheetname = $sheet->getTitle();
        $record = 0x0085; // Record identifier

        // sheet state
        switch ($sheet->getSheetState()) {
            case \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::SHEETSTATE_VISIBLE:
                $ss = 0x00;

                break;
            case \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::SHEETSTATE_HIDDEN:
                $ss = 0x01;

                break;
            case \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::SHEETSTATE_VERYHIDDEN:
                $ss = 0x02;

                break;
            default:
                $ss = 0x00;

                break;
        }

        // sheet type
        $st = 0x00;

        $grbit = 0x0000; // Visibility and sheet type

        $data = pack('VCC', $offset, $ss, $st);
        $data .= StringHelper::UTF8toBIFF8UnicodeShort($sheetname);

        $length = strlen($data);
        $header = pack('vv', $record, $length);
        $this->append($header . $data);
    }
Writes Excel BIFF BOUNDSHEET record.

@param Worksheet $sheet Worksheet name
@param int $offset Location of worksheet BOF