From 868cf8edc086193d095f0e7885be78d10e0aeb8d Mon Sep 17 00:00:00 2001 From: Sergey Shuchkin Date: Fri, 3 Sep 2021 22:12:48 +0600 Subject: [PATCH] 1.0.21 --- CHANGELOG.md | 4 ++++ src/SimpleXLSXGen.php | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8da8420..41cbdd6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 1.0.21 (2021-09-03) + +* Fixed saveAs / downloadAs / etc methods more than once + ## 1.0.20 (2021-07-29) * Fixed sheet names duplicates (Page, Page (1), Page (2)...) diff --git a/src/SimpleXLSXGen.php b/src/SimpleXLSXGen.php index f653862..14d6ac5 100644 --- a/src/SimpleXLSXGen.php +++ b/src/SimpleXLSXGen.php @@ -249,8 +249,8 @@ class SimpleXLSXGen { $this->SI[] = 'No Data'; } $si_cnt = count($this->SI); - $this->SI = ''.implode("\r\n", $this->SI).''; - $template = str_replace(['{CNT}', '{STRINGS}'], [ $si_cnt, $this->SI ], $template ); + $si = ''.implode("\r\n", $this->SI).''; + $template = str_replace(['{CNT}', '{STRINGS}'], [ $si_cnt, $si ], $template ); $this->_writeEntry($fh, $cdrec, $cfilename, $template); $entries++; } elseif ( $cfilename === 'xl/worksheets/sheet1.xml' ) {