code: private static function checkSheetTitle($pValue)
      {
          // Some of the printable ASCII characters are invalid:  * : / \ ? [ ]
          if (str_replace(self::$invalidCharacters, '', $pValue) !== $pValue) {
              throw new Exception('Invalid character found in sheet title');
          }
  
          // Maximum 31 characters allowed for sheet title
          if (Shared\StringHelper::countCharacters($pValue) > 31) {
              throw new Exception('Maximum 31 characters allowed in sheet title.');
          }
  
          return $pValue;
      }
docs: Check sheet title for valid Excel syntax.
  
  @param string $pValue The string to check
  
  @throws Exception
  
  @return string The valid string