Property | Type | Description | |
---|---|---|---|
$SHEETS_NAME_USED | Associative array [SHEET_INDEX] => [SHEET_NAME] keeping track of sheets' name to enforce uniqueness | ||
$index | Index of the sheet, based on order in the workbook (zero-based) | ||
$name | Name of the sheet | ||
$stringHelper | Box\Spout\Common\Helper\StringHelper |
Method | Description | |
---|---|---|
__construct ( integer $sheetIndex ) | ||
getIndex ( ) : integer | ||
getName ( ) : string | ||
setName ( string $name ) : |
Sets the name of the sheet. Note that Excel has some restrictions on the name: - it should not be blank - it should not exceed 31 characters - it should not contain these characters: \ / ? * : [ or ] - it should be unique |
Method | Description | |
---|---|---|
doesContainInvalidCharacters ( string $name ) : boolean | Returns whether the given name contains at least one invalid character. | |
doesStartOrEndWithSingleQuote ( string $name ) : boolean | Returns whether the given name starts or ends with a single quote | |
isNameUnique ( string $name ) : boolean | Returns whether the given name is unique. | |
throwIfNameIsInvalid ( string $name ) : void | Throws an exception if the given sheet's name is not valid. |
public __construct ( integer $sheetIndex ) | ||
$sheetIndex | integer | Index of the sheet, based on order in the workbook (zero-based) |
protected doesContainInvalidCharacters ( string $name ) : boolean | ||
$name | string | |
return | boolean | TRUE if the name contains invalid characters, FALSE otherwise. |
protected doesStartOrEndWithSingleQuote ( string $name ) : boolean | ||
$name | string | |
return | boolean | TRUE if the name starts or ends with a single quote, FALSE otherwise. |
protected isNameUnique ( string $name ) : boolean | ||
$name | string | |
return | boolean | TRUE if the name is unique, FALSE otherwise. |
protected throwIfNameIsInvalid ( string $name ) : void | ||
$name | string | |
return | void |
protected static $SHEETS_NAME_USED |
protected $index |