1
0
mirror of https://github.com/shuchkin/simplexlsxgen.git synced 2023-08-10 21:12:59 +03:00

debug example

This commit is contained in:
Sergey Shuchkin 2020-07-14 17:19:58 +06:00
parent 72b9f420d7
commit 8a38813b12
2 changed files with 4 additions and 3 deletions

View File

@ -1,4 +1,4 @@
# SimpleXLSXGen class 0.9.14 (Official)
# SimpleXLSXGen class 0.9.15 (Official)
[<img src="https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fshieldsio-patreon.herokuapp.com%2Fshuchkin" />](https://www.patreon.com/shuchkin) [<img src="https://img.shields.io/github/license/shuchkin/simplexlsxgen" />](https://github.com/shuchkin/simplexlsxgen/blob/master/license.md) [<img src="https://img.shields.io/github/stars/shuchkin/simplexlsxgen" />](https://github.com/shuchkin/simplexlsxgen/stargazers) [<img src="https://img.shields.io/github/forks/shuchkin/simplexlsxgen" />](https://github.com/shuchkin/simplexlsxgen/network) [<img src="https://img.shields.io/github/issues/shuchkin/simplexlsxgen" />](https://github.com/shuchkin/simplexlsxgen/issues)
Export data to Excel XLSX file. PHP XLSX generator. No external tools and libraries.<br/>
@ -61,6 +61,7 @@ SimpleXLSXGen::fromArray( $data )->saveAs('debug.xlsx');
## History
v0.9.15 (2020-07-14) escape of shared strings #1<br/>
v0.9.14 (2020-05-31) fixed num2name A-Z,AA-AZ column names, thx Ertan Yusufoglu<br/>
v0.9.13 (2020-05-21) if string more 160 chars, save as inlineStr<br/>
v0.9.12 (2020-05-21) readme fixed<br/>

View File

@ -208,10 +208,10 @@ class SimpleXLSXGen {
$cs = 5; // [22] m/d/yy h:mm
} elseif ( mb_strlen( $v ) > 160 ) {
$ct = 'inlineStr';
$cv = htmlentities( $v, ENT_QUOTES );
$cv = str_replace(['&','<','>'],['&amp;','&lt;','&gt;'], $v);
} else {
$ct = 's'; // shared string
$v = htmlentities($v, ENT_QUOTES);
$v = str_replace(['&','<','>'],['&amp;','&lt;','&gt;'], $v);
$cv = array_search( $v, $SI, true );
if ( $cv === false ) {
$SI[] = $v;