1
0
mirror of https://github.com/shuchkin/simplexlsxgen.git synced 2023-08-10 21:12:59 +03:00
This commit is contained in:
Sergey Shuchkin 2021-09-20 00:51:25 +06:00
parent 868cf8edc0
commit 79ffbb5e30

View File

@ -122,11 +122,11 @@ class SimpleXLSXGen {
} else { } else {
$names = []; $names = [];
foreach( $this->sheets as $sh ) { foreach( $this->sheets as $sh ) {
$names[ strtoupper( $sh['name']) ] = 1; $names[ mb_strtoupper( $sh['name']) ] = 1;
} }
for( $i = 0; $i < 100; $i++ ) { for( $i = 0; $i < 100; $i++ ) {
$new_name = ($i === 0) ? $name : $name .' ('.$i.')'; $new_name = ($i === 0) ? $name : $name .' ('.$i.')';
$NEW_NAME = strtoupper( $new_name ); $NEW_NAME = mb_strtoupper( $new_name );
if ( !isset( $names[ $NEW_NAME ]) ) { if ( !isset( $names[ $NEW_NAME ]) ) {
$name = $new_name; $name = $new_name;
break; break;