code: 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);
      }
docs: Writes Excel BIFF BOUNDSHEET record.
  
  @param Worksheet $sheet Worksheet name
  @param int $offset Location of worksheet BOF