private static function PHPExcel_Worksheet::_checkSheetTitle in Loft Data Grids 7.2
Same name and namespace in other branches
- 6.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet.php \PHPExcel_Worksheet::_checkSheetTitle()
Check sheet title for valid Excel syntax
Parameters
string $pValue The string to check:
Return value
string The valid string
Throws
1 call to PHPExcel_Worksheet::_checkSheetTitle()
- PHPExcel_Worksheet::setTitle in vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Worksheet.php - Set title
File
- vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Worksheet.php, line 463
Class
- PHPExcel_Worksheet
- PHPExcel_Worksheet
Code
private static function _checkSheetTitle($pValue) {
// Some of the printable ASCII characters are invalid: * : / \ ? [ ]
if (str_replace(self::$_invalidCharacters, '', $pValue) !== $pValue) {
throw new PHPExcel_Exception('Invalid character found in sheet title');
}
// Maximum 31 characters allowed for sheet title
if (PHPExcel_Shared_String::CountCharacters($pValue) > 31) {
throw new PHPExcel_Exception('Maximum 31 characters allowed in sheet title.');
}
return $pValue;
}