Update SimpleXLSXGen.php
Removing special characters known to me from the sheet name. Since if you do not delete these characters, then Excel says that the sheet is broken and offers to restore it.
This commit is contained in:
parent
e0bf379eaa
commit
26da882d97
|
@ -237,7 +237,7 @@ class SimpleXLSXGen
|
|||
if ($name === null) { // autogenerated sheet names
|
||||
$name = 'Sheet' . ($this->curSheet + 1);
|
||||
} else {
|
||||
$name = mb_substr($name, 0, 31);
|
||||
$name = mb_substr(str_replace(["*", "/", "|", "\\", "[", "]", ":"], '', $name), 0, 31);
|
||||
$names = [];
|
||||
foreach ($this->sheets as $sh) {
|
||||
$names[mb_strtoupper($sh['name'])] = 1;
|
||||
|
|
Loading…
Reference in New Issue