protected function Xls::validateWorksheetTitle in Excel Serialization 8
Validates the title of the Worksheet to ensure it's valid.
Worksheet titles must not exceed 31 characters, contain:- ":" "\" "/" "?" "*" "[" "]" or be blank.
Parameters
string $title: The orginal worksheet value.
Return value
string The validated worksheet title
1 call to Xls::validateWorksheetTitle()
- Xls::encode in src/
Encoder/ Xls.php - Encodes data into the given format.
File
- src/
Encoder/ Xls.php, line 500
Class
- Xls
- Adds XLS encoder support for the Serialization API.
Namespace
Drupal\xls_serialization\EncoderCode
protected function validateWorksheetTitle($title) {
$title = preg_replace('[:\\*/\\[\\]?]', '', $title);
return substr($title, 0, 30);
}