mirror of
https://github.com/shuchkin/simplexlsxgen.git
synced 2023-08-10 21:12:59 +03:00
1.0.19
This commit is contained in:
parent
6d49a90fe7
commit
5b58103e3b
@ -1,5 +1,9 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 1.0.19 (2021-07-28)
|
||||||
|
|
||||||
|
* Fixed sheet names duplicates
|
||||||
|
|
||||||
## 1.0.18 (2021-07-28)
|
## 1.0.18 (2021-07-28)
|
||||||
|
|
||||||
* Fixed email regex
|
* Fixed email regex
|
||||||
|
@ -117,6 +117,14 @@ class SimpleXLSXGen {
|
|||||||
public function addSheet( array $rows, $name = null ) {
|
public function addSheet( array $rows, $name = null ) {
|
||||||
$this->curSheet++;
|
$this->curSheet++;
|
||||||
|
|
||||||
|
if ( $name !== null ) {
|
||||||
|
foreach( $this->sheets as $sh ) {
|
||||||
|
if ( $name === $sh['name'] ) {
|
||||||
|
$name .= ' ' . mt_rand( 100000, 999999 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$this->sheets[$this->curSheet] = ['name' => $name ?: 'Sheet'.($this->curSheet+1), 'hyperlinks' => []];
|
$this->sheets[$this->curSheet] = ['name' => $name ?: 'Sheet'.($this->curSheet+1), 'hyperlinks' => []];
|
||||||
|
|
||||||
if ( is_array( $rows ) && isset( $rows[0] ) && is_array($rows[0]) ) {
|
if ( is_array( $rows ) && isset( $rows[0] ) && is_array($rows[0]) ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user