code: private function writeNamedRanges(XMLWriter $objWriter, Spreadsheet $spreadsheet)
      {
          // Loop named ranges
          $namedRanges = $spreadsheet->getNamedRanges();
          foreach ($namedRanges as $namedRange) {
              $this->writeDefinedNameForNamedRange($objWriter, $namedRange);
          }
      }
docs: Write named ranges.
  
  @param XMLWriter $objWriter XML Writer
  @param Spreadsheet $spreadsheet
  
  @throws WriterException