code: private function writeSheets(XMLWriter $objWriter, Spreadsheet $spreadsheet)
      {
          // Write sheets
          $objWriter->startElement('sheets');
          $sheetCount = $spreadsheet->getSheetCount();
          for ($i = 0; $i < $sheetCount; ++$i) {
              // sheet
              $this->writeSheet(
                  $objWriter,
                  $spreadsheet->getSheet($i)->getTitle(),
                  ($i + 1),
                  ($i + 1 + 3),
                  $spreadsheet->getSheet($i)->getSheetState()
              );
          }
  
          $objWriter->endElement();
      }
docs: Write sheets.
  
  @param XMLWriter $objWriter XML Writer
  @param Spreadsheet $spreadsheet
  
  @throws WriterException