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-07-28 01:45:25 +06:00
parent c9fa7da689
commit c8a94d552a
2 changed files with 5 additions and 1 deletions

View File

@ -1,5 +1,9 @@
# Changelog # Changelog
## 1.0.17 (2021-07-28)
* Fixed " and & in sheets names
## 1.0.16 (2021-07-01) ## 1.0.16 (2021-07-01)
* Fixed "&" in hyperlinks * Fixed "&" in hyperlinks

View File

@ -217,7 +217,7 @@ class SimpleXLSXGen {
} elseif ( $cfilename === 'xl/workbook.xml' ) { } elseif ( $cfilename === 'xl/workbook.xml' ) {
$s = ''; $s = '';
foreach ( $this->sheets as $k => $v ) { foreach ( $this->sheets as $k => $v ) {
$s .= '<sheet name="' . $v['name'] . '" sheetId="' . ( $k + 1) . '" state="visible" r:id="rId' . ( $k + 2) . '"/>'; $s .= '<sheet name="' . $this->esc( $v['name'] ) . '" sheetId="' . ( $k + 1) . '" state="visible" r:id="rId' . ( $k + 2) . '"/>';
} }
$template = str_replace('{SHEETS}', $s, $template); $template = str_replace('{SHEETS}', $s, $template);
$this->_writeEntry($fh, $cdrec, $cfilename, $template); $this->_writeEntry($fh, $cdrec, $cfilename, $template);